可能重複:
Prefixing property names with an underscore in Objective C的ViewController = _ViewController意味着
我剛開始iPhone應用程序開發和發現,當你生成一個新的項目,下面的代碼可以在AppDelegate中看到。 m
@synthesize window = _window;
@synthesize viewController = _viewController;
AND在AppDelegate.h文件中它說
@property (strong, nonatomic) UIWindow window;
@property (strong, nonatomic) ViewController controller;
我只想知道這到底意味着什麼,特別是合成部分。是否 實例化一個本地私有變量?如果是這樣,這與說 @synthesize viewController有什麼不同?
感謝
HTTP:/ /stackoverflow.com/q/7174277/ http://stackoverflow.com/q/822487/ http://stackoverflow.com/q/2371489/ http://stackoverflow.com/q/6139593/ http:// stackoverflow的.com /查詢q =%5Bobjc%5D +下劃線+屬性&提交=搜索 – 2012-02-11 01:27:32