随笔分类 -  iOS

上一页 1 2

iOS默认的set方法
摘要:今天发现工程里有同事代码如下:-(void)dealloc{ [self.indicatorViewrelease]; self.indicatorView = nil; [super dealloc];}这种低级错误必定导致崩溃。其实iOS本身一个property对象,如果是retain属性,调用它的赋值,其实是调用了如下代码:-(void)setIndicatorView:(UIActivityIndicatorView *)indicatorView{ if(indicatorView != _indicatorView){ [_indicatorViewrelease];... 阅读全文

posted @ 2013-05-26 21:44 VicStudio 阅读(1007) 评论(0) 推荐(0) 编辑

上一页 1 2