Slide 56
Slide 56 text
Type-Safe Enums
• Enums that you can declare the type they enumerate over
• int, char, unsigned char, NSUInteger, ...
• Syntax similar to Object Subclassing
typedef enum MyEnum : NSUInteger {
A, B, C
} MyEnum;
enum MyUnsignedCharEnum : unsigned char {
FIRST, SECOND, THIRD
};
typedef enum MyUnsignedCharEnum MyUnsignedCharEnum;
typedef enum : NSUInteger {
ONE, TWO, THREE
} AnotherEnum;