Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Now that we’ve discussed the correct way to write the accessor methods setName: and setEmail:, and you understand the important principles, we can go back and let the system generate the accessor methods for you. Consider the second version of the AddressCard interface file:
#import <Foundation/NSObject.h>
#import <Foundation/NSString.h>
@interface AddressCard: NSObject
{
NSString *name;
NSString *email;
}
@property (copy, nonatomic) NSString *name, *email;
-(void) print;
@end