I was just working through a iPhone book and I noticed a comment that stated…
If you declare a property with a
different name than its underlying
instance varaible (which can be done
with the @synthesize directive)
Can anyone explain how the above quote might work, I am just curious as all references to @property / @synthesize always look like my code below.
@interface Planet : NSObject {
NSString *planetName;
}
@property(copy) NSString *planetName;
...
@synthesize planetName;
gary
I would presume the book would go on to explain, but i would look like this: