可能重複:
Prefixing property names with an underscore in Objective C對象 - @synthesize
iPhone應用程序開發者初學者在這裏:
在.H@property (nonatomic, retain) IBOutlet UILabel *detailDescriptionLabel;
在.M
@synthesize detailDescriptionLabel = _detailDescriptionLabel;
我已經習慣了看到
@synthesize detailDescriptionLabel;
的= _
是扔我了,這是什麼做的?
另請參見:[Cocoa Objective-C類中的變量前面的下劃線如何工作?](http://stackoverflow.com/questions/822487/how-does-an-underscore-in-front-of -a-variable-in-a-cocoa-objective-c-class-work)和[下屬性名前綴](http://stackoverflow.com/questions/5582448/underscore-prefix-on-property-name) – 2011-06-11 18:11:27
iOS 5處於NDA之下;編輯爲不違反。 – bbum 2011-06-11 18:15:44