Skip to content

Instantly share code, notes, and snippets.

@riosc
Last active December 14, 2015 05:39
Show Gist options
  • Save riosc/5036346 to your computer and use it in GitHub Desktop.
Save riosc/5036346 to your computer and use it in GitHub Desktop.
enum c tutorial
http://crasseux.com/books/ctutorial/enum.html
typedef NS_OPTIONS(NSUInteger, ComponentOptions){
ComponentOptionA = 0,
ComponentOptionB = 1 << 0,
ComponentOptionC = 1 << 1,
ComponentOptionD = 1 << 2,
ComponentOptionE = 1 << 3,
ComponentOptionF = 1 << 4,
ComponentOptionG = 1 << 5,
};
typedef NS_ENUM(NSUInteger, OptionsName){
OptionNameNull = 'a',
OptionNameOpen,
OptionNameClose,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment