I have a property like window
I saw in some example use:
@synthesize window = _window
is this statement still necessary for xcode5 and above?
I have a property like window
I saw in some example use:
@synthesize window = _window
is this statement still necessary for xcode5 and above?
No.
@synthesize
is no longer necessary for properties.
Properties are auto-synthesized to their name prefixed with an underscore as of Xcode 4.
HOWEVER, @synthesize
is NOT deprecated. If you don't like the underscore convention, you can manually synthesize your properties to whatever you want.
Additionally, properties declared in @protocol
s are NOT auto-synthesized, but can still be synthesized using the @synthesize
keyword.