可能重复:
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