I'm using XCode 4.4.1 to learn iPhone dev.
I'm creating outlet properties in my ABCViewController.h header by dragging from the 'Referencing Outlets' section in the pop-up menu for a UIObject. This adds lines such as:
@property (strong, nonatomic) IBOutlet UITextField *nameField;
to the header file.
Now when I view the corresponding ABCViewController.m file I'm expecting to see
@synthesize nameField;
auto-generated somewhere. But it isn't - I have to add each @synthesize statement manually.
It's only a minor niggle, but I'd like to know what's going wrong.
Any ideas?
In Xcode 4.4 (specifically, the LLVM 4.0 Compiler), synthesis of properties happens by default if there's no @synthesize directive. It's equivalent to:
@synthesize nameField = _nameField;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.