摘要: 1,UIView的setNeedsDisplay和setNeedsLayout方法首先两个方法都是异步执行的。而setNeedsDisplay会调用自动调用drawRect方法,这样可以拿到 UIGraphicsGetCurrentContext,就可以画画了。而setNeedsLayout会默认调... 阅读全文
posted @ 2015-11-26 21:32 11月的淡然 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 在最新的xcode中,已经不需要我们自己去写 set,get 方法,,系统已经自动帮我们生成set,get方法。同时我们发现在我们访问我们声明的变量时,会有self. 和 以"_"开头的访问方式,那么这两种方式到底有什么样的区别呢?我们来一起看一下:@property (retain, nonato... 阅读全文
posted @ 2015-11-26 21:22 11月的淡然 阅读(4148) 评论(0) 推荐(0) 编辑