Created
December 9, 2010 04:56
-
-
Save jawngee/734355 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SomeObject.h | |
// | |
#import <Cocoa/Cocoa.h> | |
@interface SomeObject { | |
NSString *title; | |
NSString *subtitle; | |
} | |
@property (retain) NSString *title; | |
@property (retain) NSString *subtitle; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SomeObject.m | |
// | |
#import "SomeObject.h" | |
@implementation SomeObject | |
@synthesize title; | |
@synthesize subtitle; | |
-(id)init { | |
if (self=[super init]) | |
{ | |
self.title=[NSString stringWithFormat:@"allyouneed"]; | |
self.subtitle=[[[NSString alloc] init] autorelease]; | |
} | |
return self; | |
} | |
-(void)dealloc { | |
self.title=nil; | |
self.subtitle=nil; | |
[super dealloc]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment