Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property
Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property
- Subject: Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property
- From: BJ Homer <email@hidden>
- Date: Sat, 14 Nov 2009 00:06:27 -0700
On Thu, Nov 12, 2009 at 2:52 AM, Joerg Simon <email@hidden> wrote:
> Dear all other Cocoa Developers:
>
> In an app I am developing I have the following strange thing:
>
> [code in the .h file]
> @interface XY : CALayer
> BOOL _editing;
> ...
> @property (assign, getter = isEditing) BOOL editing;
>
> [/code]
>
> [code in the .m file]
> @synthesize editing = _editing;
> @dynamic editing;
The @dynamic is entirely unnecessary; you should use @synthesize or
@dynamic, but not both.
-BJ
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden