The synthesized ivars are private to the class that declares them. So you can 
use them as an ivar in that class's implementation, but not in a subclass 
implementation. Usually this is not a problem, but if you already have code 
that passes the ivar's address in a function call, for example, that won't work 
with a property.

On 2011-11-13, at 2:16 AM, ico wrote:

> I am surprise that I just know we do not need to declare instance variables
> explicitly when we declare the property and use @synthesize.
> 
> That is we do not need a instance variable to be declared that is
> corresponds to the property declaration.
> 
> 
> 
> look at this blog:
> http://cocoawithlove.com/2010/03/dynamic-ivars-solving-fragile-base.html
> 
> 
> 
> However, I just wonder, is it really true that there is no ANY different
> between explicitly declaring iVars and not delaring it?
> 
> If so, is it a better approach that just declare the property and let
> @synthesize to generate the iVars itself.
> 
> 
> 
> Any more explaination and clarify will be appreciated.
> 
> -- 
> ==========================
> Life isn't about finding yourself.
> Life is about creating yourself.
> _______________________________________________
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/dave.fernandes%40utoronto.ca
> 
> This email sent to dave.fernan...@utoronto.ca

_______________________________________________

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

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

Reply via email to