On Fri, 22 Mar 2013 15:27:08 -0700, Quincey Morris 
<quinceymor...@rivergatesoftware.com> said:
>If you want to declare a private ivar yourself, you should do it in the 
>implementation and not in the interface:
>
>       @implementation MyClass
>       {
>               NSNumber* _someProperty;
>       }
>       @end

And if you want to declare a private *property* yourself, or redeclare a 
property so as to make it, say, readonly to the public but readwrite for 
yourself, you do it in the implementation file, in the interface to an 
anonymous category ("class extension"):

// in the implementation file
@interface MyClass ()
@property ...
@end

The OP might like to read my book on this topic; it's the same for iOS and for 
Mac OS X, as I fancy I've put together a decent reasoned discussion, separating 
the pieces, as they are in fact separate matters (accessors, memory management, 
ARC, properties) and putting them together at the end:

http://www.apeth.com/iOSBook/ch12.html

m.

--
matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 6! http://shop.oreilly.com/product/0636920029717.do
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to