Under what conditions is @synthesize automatic in Objective-c?
Perhaps when using LLVM 3.0 and up? From reading around the net it seems like
As of Xcode 4.4, if you don't write @synthesize
or @dynamic
for a property. the compiler acts as though you had written @synthesize property = _property
.
Prior to Xcode 4.4, you must do one of the following things for each property or else the compiler will issue a warning and you will get a runtime error. In Xcode 4.4 or later, you may do any of the following things instead of letting the compiler automatically synthesize the property accessors and instance variable.
@synthesize
directive.@dynamic
directive and somehow provide the property getter and (if necessary) setter at runtime.readwrite
, the property setter method.Note that you can use the @synthesize
directive (or the @dynamic
directive) and also explicitly provide the getter and/or setter methods. But @synthesize
provides them if you omit them.