Skip to content

Instantly share code, notes, and snippets.

@armadsen
Last active January 4, 2016 11:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armadsen/8618759 to your computer and use it in GitHub Desktop.
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
#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