标签:style blog color sp div log bs as new
主要的区别是加self. 会调用变量的GET和SET方法
而根本的区别在于变量的SET方法,而SET方法和变量的@property 属性有关。
// assign -(void)setMyObject:(id)newValue{ _myObject = newValue; } // retain -(void)setMyObject:(id)newValue{ if (_myObject != newValue) { [_myObject release]; _myObject = [newValue retain]; } } // copy -(void)setMyObject:(id)newValue{ if (_myObject != newValue) { [_myObject release]; _myObject = [newValue copy]; } }
标签:style blog color sp div log bs as new
原文地址:http://www.cnblogs.com/wydoublefish/p/4171928.html