Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "Photo.h"
- @implementation Photo
- @synthesize caption;
- @synthesize photographer;
- - (id) init
- {
- if ( self = [super init] )
- {
- self.caption = @"Default Caption";
- self.photographer = @"Default Photographer";
- }
- return self;
- }
- - (void) dealloc
- {
- self.caption = nil;
- self.photographer = nil;
- [super dealloc];
- }
- - (NSString*)description
- {
- return [NSString stringWithFormat:@"Photo caption: %@, photographer: %@", self.caption, self.photographer];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement