Skip to content

Instantly share code, notes, and snippets.

@rexeisen
Created May 9, 2013 15:39
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 rexeisen/5548261 to your computer and use it in GitHub Desktop.
Save rexeisen/5548261 to your computer and use it in GitHub Desktop.
@interface Class : NSObject
extern const struct ClassConstants {
__unsafe_unretained NSString *foo;
__unsafe_unretained NSString *bar;
} ClassContstants;
@end
@implementation Class
const struct ClassContstants ClassContstants = {
.foo = @"kClassConstantsFoo",
.bar = @"kClassConstantsBar",
};
- (void)someMethods
{
NSLog(@"%@", ClassConstants.foo); // Prints kClassConstantsFoo
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment