Skip to content

Instantly share code, notes, and snippets.

@kballenegger
Last active February 19, 2016 05:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kballenegger/9336601 to your computer and use it in GitHub Desktop.
Save kballenegger/9336601 to your computer and use it in GitHub Desktop.
Strings as enum values
NSString *const kCBLocationAtStartupString = @"startup";
// etc ...
typedef NS_ENUM(NSString *, CBLocation) {
CBLocationAtStartup = kCBLocationAtStartupString,
// etc.
};
- (void)showInterstitial:(CBLocation)location {
NSString *locationString = (NSString *)location
}
@codigodelsur
Copy link

This doesn't compile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment