Skip to content

Instantly share code, notes, and snippets.

@Krishna
Created February 27, 2012 15:16
Show Gist options
  • Select an option

  • Save Krishna/1924482 to your computer and use it in GitHub Desktop.

Select an option

Save Krishna/1924482 to your computer and use it in GitHub Desktop.
#import "LCYThing.h"
@interface LCYThing (Transmogrify)
- (void) turnIntoCat;
@end
#import "LCYThing+Transmogrify.h"
@implementation LCYThing (Transmogrify)
- (void) turnIntoCat;
{
self.privateDetail = @"Put a cat mask on";
}
@end
@interface LCYThing : NSObject
- (void) doSomething;
@end
#import "LCYThing.h"
@interface LCYThing()
@property (nonatomic, retain) NSString *privateDetail;
@end
@implementation LCYThing
@synthesize privateDetail = _privateDetail;
- (void) dealloc;
{
[_privateDetail release]; _privateDetail = nil;
[super dealloc];
}
- (id) init;
{
self = [super init];
if (self)
{
self.privateDetail = @"A private detail";
}
return self;
}
- (void) doSomething;
{
NSLog(@"%@ did something using: %@", self, self.privateDetail);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment