摘要: 设置环境变量:只在DEBUG版本设置,自己调试使用,设置这两个参数则内存是不会释放掉的。当出现message sent to deallocated instance EXC_BAD_ACCESS,会在xcode console打印出类似的日志:2015-09-09 12:00:54.073 Tri... 阅读全文
posted @ 2015-09-11 17:21 怎么也得过啊 阅读(163) 评论(0) 推荐(0) 编辑
摘要: from:iOS Good PracticesThe Clang compiler (which Xcode uses) has astatic analyzerthat performs control and data flow analysis on your code and checks ... 阅读全文
posted @ 2015-09-11 17:20 怎么也得过啊 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 开始在cell中是使用这个函数来加载图片的。[self.photoView sd_setImageWithURL:[NSURL URLWithString: [post objectForKey: @"thumb_url"]] completed:^(UIImage *image, NSError ... 阅读全文
posted @ 2015-09-11 17:18 怎么也得过啊 阅读(3289) 评论(0) 推荐(0) 编辑
摘要: 对于readwrite property, 如果getter setter都被重写了,则编译器不会自动生成 instance variable,得自己定义。对于readonly,getter被重写了也是同理。正确的使用weak。为了避免循环引用,会使用weak,但是weak的对象随时可能不在,那么如... 阅读全文
posted @ 2015-09-11 17:15 怎么也得过啊 阅读(232) 评论(0) 推荐(0) 编辑
摘要: initialize当程序向一个类或者它的子类第一次发消息的时候,runtime会向该类发送initialize消息。如果super class之前没有收到过initialize消息,会首先调用super class的initialize,然后才当前class的initialize.如果当前类没有实... 阅读全文
posted @ 2015-09-11 16:50 怎么也得过啊 阅读(1444) 评论(0) 推荐(0) 编辑