You should typically use the Objective-C declared properties feature to declare accessor methods (see Declared Properties in The Objective-C 2.0 Programming Language), for example:
@property (copy) NSString *firstName; |
@property (readonly) NSString *fullName; |
@property (retain) NSDate *birthday; |
@property NSInteger luckyNumber; |
The declaration makes explicit the memory management semantics for the property.
No comments:
Post a Comment