Last active
January 4, 2016 11:59
-
-
Save armadsen/8618759 to your computer and use it in GitHub Desktop.
Demonstration of multiple class extensions in Objective-C. For http://stackoverflow.com/a/21343983/344733
This file contains 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 <Foundation/Foundation.h> | |
@interface TestClass : NSObject | |
@end | |
@interface TestClass () | |
@property NSString *name; | |
@end | |
@interface TestClass () | |
@property NSString *name2; | |
@end | |
@interface TestClass () | |
@property NSString *name3; | |
@end | |
@implementation TestClass | |
@end | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
TestClass *test = [TestClass new]; | |
test.name = @"Bob"; | |
test.name2 = @"Jones"; | |
test.name3 = @"III"; | |
NSLog(@"%@ %@ %@", test.name, test.name2, test.name3); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment