Created
February 27, 2012 15:16
-
-
Save Krishna/1924482 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
| #import "LCYThing.h" | |
| @interface LCYThing (Transmogrify) | |
| - (void) turnIntoCat; | |
| @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
| #import "LCYThing+Transmogrify.h" | |
| @implementation LCYThing (Transmogrify) | |
| - (void) turnIntoCat; | |
| { | |
| self.privateDetail = @"Put a cat mask on"; | |
| } | |
| @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
| @interface LCYThing : NSObject | |
| - (void) doSomething; | |
| @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
| #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