上一页 1 ··· 5 6 7 8 9
摘要: 1 #import "ViewController.h" 2 3 static NSInteger count = 0; 4 5 @interface ViewController () 6 7 @property (weak, nonatomic) IBOutlet UILabel *la... 阅读全文
posted @ 2015-10-14 15:16 xiao孛 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 再block中使用 self 时,要在前面加上__block。防止在block中用到self时把self对象retain, 造成内存泄露。__block UIViewController *safeSelf = self;[{ safeSelf.button = button; // __bloc... 阅读全文
posted @ 2015-10-13 15:12 xiao孛 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 一、早前的几个网络框架1、ASI框架:HTTP终结者.很牛,但是有BUG,已经停止更新.2、MKNetworkKit(印度人写的).3、AFN一直还在更新.AFNetworking的出现:MAC/iOS设计的一套网络框架.(为了简化网络操作)地址:https://github.com/AFNetwo... 阅读全文
posted @ 2015-09-25 10:57 xiao孛 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 1.在非调试状态下NSLog不工作#ifdef DEBUG#define NSLog(...) NSLog(__VA_ARGS__)#else#define NSLog(...)#endif2.去掉打印的时间戳#ifdef DEBUG#define NSLog(FORMAT, ...) fprint... 阅读全文
posted @ 2015-09-21 16:21 xiao孛 阅读(273) 评论(0) 推荐(0) 编辑
摘要: > 1.简单的存储字符串,状态,数据类型// 存储数据NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];// 字符串- (void)setObject:(id)value forKey:(NSString *)defau... 阅读全文
posted @ 2015-09-15 18:41 xiao孛 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Xcode的路径小知识纪录模拟器应用程序的安装路径/Users/aplle/资源库/Application Support/iPhone Simulator/7.1/ApplicationsXcode文档安装路径/Applications/Xcode.app/Contents/Developer/D... 阅读全文
posted @ 2015-09-15 18:39 xiao孛 阅读(216) 评论(0) 推荐(0) 编辑
摘要: /** 添加定时器 */@property (nonatomic, strong) NSTimer *timer;- (void)addTimer{ // 2秒后,自己 调用nextImage方法 nil 一直循环这个定时器 self.timer = [NSTimer scheduled... 阅读全文
posted @ 2015-09-15 18:36 xiao孛 阅读(150) 评论(0) 推荐(0) 编辑
摘要: // 创建一个弹框UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@“标题” message:@“显示的具体内容” delegate:self cancelButtonTitle:@“取消” otherButtonTitle:@“确定”... 阅读全文
posted @ 2015-09-15 18:32 xiao孛 阅读(283) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9