摘要: (1)编译正常,运行报 [UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to此时需要 other linker flags 添加 -all_load参数。 具体:Project ->build settings 阅读全文
posted @ 2016-02-08 19:45 xiaocaoera 阅读(1125) 评论(0) 推荐(0) 编辑
摘要: 项目中至少要有一个.mm文件 阅读全文
posted @ 2016-02-08 16:30 xiaocaoera 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1 - (IBAction)schedule { 2 // 1.创建本地推送通知对象 3 UILocalNotification *ln = [[UILocalNotification alloc] init]; 4 5 // 2.设置通知属性 6 // 音效文件名 7 ln.soundName = 阅读全文
posted @ 2016-02-06 18:38 xiaocaoera 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1 将非arc转成arc edit➡️convert➡️to objective-c ARC ☑️ 如果不成功试以下方法 2 target中build phases下compile source中非arc的标记为 -fno-objc-arc(如果文件过多,这种方法太笨,不太适合) 3 到处静态库:选 阅读全文
posted @ 2016-02-06 16:53 xiaocaoera 阅读(176) 评论(0) 推荐(0) 编辑
摘要: if (_helps == nil) { NSString *path = [[NSBundle mainBundle] pathForResource:@"help.json" ofType:nil]; NSData *data = [NSData dataWithContentsOfFile:p 阅读全文
posted @ 2016-02-04 21:56 xiaocaoera 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1 // 监听键盘 2 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShowAction:) name:UIKeyboardWillShowNotification obj 阅读全文
posted @ 2016-01-28 10:26 xiaocaoera 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 需要同时写如下两行代码 self.resendBtn.titleLabel.text = str; [self.resendBtn setTitle:str forState:UIControlStateDisabled]; 阅读全文
posted @ 2016-01-27 18:30 xiaocaoera 阅读(728) 评论(0) 推荐(0) 编辑
摘要: 在AppDelegate中添加下面一句 self.window.backgroundColor = [UIColor whiteColor]; 阅读全文
posted @ 2016-01-27 14:53 xiaocaoera 阅读(282) 评论(0) 推荐(0) 编辑
摘要: #ifdef __OBJC__ #import #import #import "UIView+Extension.h"// 颜色#define HMColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/25... 阅读全文
posted @ 2016-01-26 11:56 xiaocaoera 阅读(1735) 评论(0) 推荐(0) 编辑
摘要: 1 #import 2 3 @interface HMFileDownloader : NSObject 4 /** 5 * 所需要下载文件的远程URL(连接服务器的路径) 6 */ 7 @property (nonatomic, copy) NSString *url; ... 阅读全文
posted @ 2016-01-25 18:51 xiaocaoera 阅读(226) 评论(0) 推荐(0) 编辑