Skip to content

Instantly share code, notes, and snippets.

@jawngee
Created December 9, 2010 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jawngee/734355 to your computer and use it in GitHub Desktop.
Save jawngee/734355 to your computer and use it in GitHub Desktop.
//
// SomeObject.h
//
#import <Cocoa/Cocoa.h>
@interface SomeObject {
NSString *title;
NSString *subtitle;
}
@property (retain) NSString *title;
@property (retain) NSString *subtitle;
@end
//
// 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