摘要:
原帖地址:http://cc.cocimg.com/bbs/attachment/Fid_6/6_38018_ac3c2d3e9dad9c6.png 阅读全文
摘要:
用@property不就完了么,为啥要自己写Getter和Setter?有些时候需要在getter和setter方法中加入些特别的操作。最简单的getter和setter- (SomeVariable)someValue{ return someValue;}- (void)setSomeValue:(SomeVariable)aSomeVariableValue{ someValue = aSomeVariableValue;}如果我们把nonatomic, assign的property展开,就能得到以上的getter和setter。@property (nonatomic, ... 阅读全文