第一种写法
typedef NS_ENUM(NSInteger, UIViewAnimationTransition) {
UIViewAnimationTransitionNone,//默认从0开始
UIViewAnimationTransitionFlipFromLeft,
UIViewAnimationTransitionFlipFromRight,
UIViewAnimationTransitionCurlUp,
UIViewAnimationTransitionCurlDown,
};
第二种写法typedef enum {
//以下是枚举成员 TestA = 0,
TestB,
TestC,
TestD
}Test;//枚举名称
第三种写法typedef NS_ENUM(NSInteger, Test1) {
//以下是枚举成员
Test1A = 0,
Test1B = 1,
Test1C = 2,
Test1D = 3
};