Last active
February 19, 2016 05:47
-
-
Save kballenegger/9336601 to your computer and use it in GitHub Desktop.
Strings as enum values
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
NSString *const kCBLocationAtStartupString = @"startup"; | |
// etc ... | |
typedef NS_ENUM(NSString *, CBLocation) { | |
CBLocationAtStartup = kCBLocationAtStartupString, | |
// etc. | |
}; | |
- (void)showInterstitial:(CBLocation)location { | |
NSString *locationString = (NSString *)location | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't compile