- 博客(38)
- 收藏
- 关注

转载 实现字典和对象转换的工具类
#import @interface EntityHelper : NSObject//字典对象转为实体对象+ (void) dictionaryToEntity:(NSDictionary *)dict entity:(NSObject*)entity;//实体对象转为字典对象+ (NSDictionary *) entityToDictionary:(id)entity;@
2015-08-21 20:56:31
871
转载 手势action_block
@implementation UIGestureRecognizer (YYAdd)- (instancetype)initWithActionBlock:(void (^)(id sender))block { self = [selfinit]; [self addActionBlock:block]; return se
2015-11-05 14:46:10
635
转载 iOS 获取文件的目录路径的几种方法
iOS 获取文件的目录路径的几种方法 2 years ago davidzhangiphone沙箱模型的有四个文件夹,分别是什么,永久数据存储一般放在什么位置,得到模拟器的路径的简单方式是什么.documents,tmp,app,Library。(NSHomeDirectory())手动保存的文件在documents文件里Nsuserdefaults保存的文件在
2015-11-04 19:24:15
367
转载 归并排序
#include #include void Merge(int sourceArr[],int tempArr[], int startIndex, int midIndex, int endIndex){ int i = startIndex, j=midIndex+1, k = startIndex; while(i!=midIn
2015-11-02 20:56:47
380
转载 快速排序
void sort(int *a, int left, int right){ if(left >= right)/*如果左边索引大于或者等于右边的索引就代表已经整理完成一个组了*/ { return ; } int i = left; int j = right; int key =
2015-11-02 20:55:12
335
转载 iOS 处理图片的一些小 Tip
首页 About Archive ACG 其他 吐槽 技术 日常 设计iOS 处理图片的一些小 Tip由 ibireme | 2015-11-02 | iOS, 技术如何把 GIF 动图保存到相册?iOS 的相册是支持保存 GIF 和 APNG 动图的,只是不
2015-11-02 19:06:42
1801
转载 快快快!27个提升效率的iOS开源库推荐
快快快!27个提升效率的iOS开源库推荐 2015-07-28 优快云 CocoaChina我热爱开源,更喜爱那些花费宝贵的业余时间来创造奇迹的开发者们,感谢他们将自己辛苦劳动的成果无偿分享给大家。开源作者和贡献者们,你们太了不起了,感谢你们所付出的一切。鉴于我是收集不全会死星人,这里我根据个人喜好选取了一些iOS的开源库。这些项目的顺序完全随机,每个都棒
2015-11-02 12:52:40
432
原创 用到的一些工具
#import #import @interface Team9Tool : NSObject#pragma mark 标准label高+ (CGFloat)heightByFloatSize:(CGFloat)fontSize With:(NSString *)text;#pragma ma
2015-10-30 09:09:19
461
原创 SQ 数据库归档
#import #import "Team9SaveModel.h"#import //#import "DesignerModel.h"//#import "FindModel.h"typedef NS_ENUM(NSUInteger, SelectInTable) { InTable, NotInTable,
2015-10-30 09:07:51
617
原创 DZN 占位图
#import "Team9EmptyTool.h"#import "Team9Header.h"#import #import //#import "AppDelegate.h"#import @interface Team9EmptyTool ()@end@i
2015-10-30 09:06:33
693
原创 用MJ 刷新加载
#import "Team9RefreshTool.h"#import #import "JQAFNetworkTool.h"#import "Team9EmptyTool.h"#import @interface Team9RefreshTool ()@property(nonatomic,assign) NSInteg
2015-10-30 09:04:33
1578
原创 基于块的遍历方式
//基于块的遍历方式 NSArray *arr = @[@"1",@"2", @"3",@"4"]; NSMutableArray *array = [NSMutableArrayarray]; [arrenumerateObjectsUsingBlock:^(id obj,NSUInteger idx, BOOL *stop) {
2015-08-26 20:49:10
405
原创 KVO 和 UIAlertViewController
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2015-08-25 19:56:27
477
原创 UIView(animation)
#import "ViewController+animation.h"#import "ViewController.h"#import "ViewController+animation.h"@interface ViewController ()@property(nonatomic,retain)UIView
2015-08-25 19:49:56
403
原创 通过model 得到 属性名和属性类型 放进数据库
#import typedefNS_ENUM(NSUInteger, PropertyArrayType) { PropertyArrayTypeName, PropertyArrayTypeAttribute};+ (NSMutableArray *)arrayWithModel:(id)model
2015-08-24 20:41:22
1676
原创 AFN的使用
#网络请求 AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManagermanager]; // 进行网络请求 [manager GET:@"http://project.lanou3g.com/teacher/yihuiyun/lanouprojec
2015-08-21 21:00:46
376
原创 自己建工具类
#import #import "Movie.h"#import @interface SaveTool : NSObject+(NSString *)documentModel:(id)model; //找路径+(void)saveMovie:(id)model delegate:(id) delegate; // 保存+(void)removeMovie:
2015-08-21 20:51:03
388
原创 UICollectionView
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2015-08-21 20:45:53
376
原创 UIBezierPath
- (void)pathLine{ UIGraphicsBeginImageContext(self.view.bounds.size); UIBezierPath *path = [UIBezierPath bezierPath]; [path moveToPoint:CGPointMake(50, 50)]; [path addLineToPoint:CGPoi
2015-08-21 20:30:00
285
原创 数据持久化
#warning 总结:数据持久化的步骤 //1.指定前往那一个文件夹 //2.用字符串接收路径 //3.拼接文件路径 //4.写入本地或归档操作 //注;如果是复杂对象归档,要签订NSCoding协议,并且实现两个协议方法,放在数组里的复杂对象归档也要签协议 苹果手机为了保证自己的数据上的绝
2015-08-20 08:04:10
351
原创 数据解析
#parser#import "ParserXML.h"@interface ParserXML()NSXMLParserDelegate>// 用来临时保存字符串内容@property(nonatomic,copy)NSString *tempStr;@end@implementation ParserXML
2015-08-17 08:22:30
373
原创 UITableView
#UITableView 继承 UIScrollView##内容###有两个协议1. 内容@property (nonatomic,assign) id UITableViewDataSource> dataSource;2. 操作@property (nonatomic,assign) id UITableViewDelegate>
2015-08-11 17:41:09
307
原创 UIScrollView, UIPageControl,UITableView
UIScrollView // 重要属性,这个属性可以让scrollview滚动起来 // 滚动范围 scrcollView.contentSize =CGSizeMake(WIDTH *6, HEIGHT); // 偏移量 scrcollView.contentOffset =CGPointMa
2015-08-05 19:40:57
469
原创 手势
//// MainViewController.m// UI05_手势识别器//// Created by dllo on 15/8/4.// Copyright (c) 2015年 dllo. All rights reserved.//#import "MainViewController.h"@interface MainViewController ()<UIA
2015-08-05 08:42:42
348
原创 汤姆猫
#import "MainViewController.h"@interface MainViewController ()@property(nonatomic, retain)UIImageView *animationImageView;@property(nonatomic, retain)NSMutableArray *picArr;@end@implementation
2015-08-04 20:59:15
522
原创 UI类的扩展和触碰
类目#import @interface UIButton (ZJQ_button)+ (id)zjq_initWithFrame:(CGRect)frame target:(id)target action:(SEL)selecor title:(NSString
2015-08-03 19:02:40
372
原创 UIView UILabel UITextFiled UIButton UIControlView UIAlertView
##UIResponder- (BOOL)resignFirstResponder;###UIView- (instancetype)initWithFrame:(CGRect)frame; 创建backgroundColor 底色 [UIColor clearColor]alpha 透明度tag 查找值###UILabel UIView的子
2015-08-01 15:46:00
533
原创 简易计算器
简易计算器,不知道为啥 有一些效果和系统的不一样//// RootViewController.m// 计算器//// Created by dllo on 15/8/1.// Copyright (c) 2015年 dllo. All rights reserved.//#import "RootViewController.h"@interface RootView
2015-08-01 15:27:47
390
原创 面对对象的三大特征
// 两个类@interface BaseModel :NSObject@interface Person : BaseModel###封装-------------------------------------------------------------@property(nonatomic,copy)NSString *name;
2015-07-28 19:51:03
318
原创 Block
------------------------------------------------------------------ NSArray *arr =@[@"1", @"2", @"3", @"4"]; NSString *str = nil;// 迭代器 NSEnumerator *enumerator = [arr
2015-07-28 19:02:21
333
原创 内存管理与copy和mutableCopy
#import #import "Student.h"int main(int argc,const char * argv[]) { NSString *str = @"123456"; NSString *strCopy = [str copy]; NSString *strMCopy = [str mutableCopy
2015-07-27 19:22:30
370
原创 省市区字典数组嵌套(UI版)
#import int main(int argc, const char * argv[]) { NSString *filePath = @"/Users/dllo/Desktop/textPCA/textPCA/area-2.txt"; NSString *string = [NSString stringWithContentsOfFile:filePath encod
2015-07-24 21:33:00
518
原创 协议
1.声明2.设置代理人//// Girl.h// OC_07类的扩展//// Created by dllo on 15/7/24.// Copyright (c) 2015年 dllo. All rights reserved.//#import // 1.声明一份协议// protocol协议的关键词@protocol Marry // 协议内容/
2015-07-24 19:05:47
328
原创 OC类 之 NSData NSDate NSSet NSNumber NSValue
NSValue:+ (NSValue *)valueWithPointer:(constvoid *)pointer; NSNumber :NSValue(的子类)@property (readonly,copy) NSString *stringValue; // 字符串@prope
2015-07-23 18:46:20
673
原创 OC类之 Dictionary
@property (readonly)NSUInteger count; // 键值对数 NSDictionary : - (NSArray *)allKeysForObject:(id)anObject; // 所有该对象的键值+ (instancetype)dic
2015-07-22 13:32:47
501
原创 几个简单的排序
// h文件void swap(int *a,int *b); // 交换两个数void printArr(int *arr,int count); // 遍历数组void simpleSelectionSort(int *arr,int count); // 简单选择排序void s
2015-07-20 19:43:26
346
原创 OC类 之 数组
@property (readonly)NSUInteger count; // 长度@property (nonatomic,readonly) id firstObject;@property (nonatomic,readonly) id lastObject;- (id)objectAtIndex:(NSUIn
2015-07-20 19:24:36
512
原创 OC类 之 NSString
@property (readonly)NSUInteger length; // 字符串长度@property (readonly,copy) NSString *uppercaseString; // 字符串的全大写@property (readonly,copy) NSString *lowercaseString;
2015-07-20 17:03:16
332
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人