摘要: 1.直接加密2.多次加密3.先加密,后乱序4.根据公司规定方法加密 阅读全文
posted @ 2015-06-07 15:11 forflame 阅读(198) 评论(0) 推荐(0) 编辑
摘要: // .h文件#define WLSingletonH(name) + (instancetype)shared##name;// .m文件#if __has_feature(objc_arc) #define WLSingletonM(name) \ static id _instac... 阅读全文
posted @ 2015-06-07 14:21 forflame 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 有时想在代码中有只执行一次的代码,第二次不会执行 static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ NSLog(@"once"); });当第二次执行到这里时,相当于该代码段从未出现过一样 阅读全文
posted @ 2015-06-07 13:51 forflame 阅读(147) 评论(0) 推荐(0) 编辑
摘要: - 1.使用NSThread类[NSThread sleepForTimeInterval:3];该方法会阻塞当前线程-2.使用NSObject中的方法[self performSelector:@selector(download:) withObject:sender afterDelay:ti... 阅读全文
posted @ 2015-06-07 13:45 forflame 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 1> NSFontAttributeName(字体)该属性所对应的值是一个 UIFont 对象。该属性用于改变一段文本的字体。如果不指定该属性,则默认为12-point Helvetica(Neue)。2> NSParagraphStyleAttributeName(段落)该属性所对应的值是一个 N... 阅读全文
posted @ 2015-06-06 15:23 forflame 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 1.创建CLLocationManager对象,并且成为它的代理- (CLLocationManager *)mgr{ if (!_mgr) { _mgr = [[CLLocationManager alloc] init]; } return _mgr;}self.... 阅读全文
posted @ 2015-06-01 20:16 forflame 阅读(320) 评论(0) 推荐(0) 编辑