--参考文章:http://blog.csdn.net/annkie/article/details/9877643
============枚举定义============
--1.C语言中定义枚举enum类型,参考文章《枚举类型enum 使用》
--2.在iOS6和Mac OS 10.8以后Apple引入了两个宏NS_ENUM和NS_OPTIONS来重新定义枚举类型,实际上是将enum定义和typedef合二为一。具体:
typedef NS_ENUM(NSInteger, UIViewAnimationTransition) {
UIViewAnimationTransitionNone,//默认从0开始
UIViewAnimationTransitionFlipFromLeft,
UIViewAnimationTransitionFlipFromRight,
UIViewAnimationTransitionCurlUp,
UIViewAnimationTransitionCurlDown,
};
typedef NS_OPTIONS(NSUInteger, UIViewAutoresizing) {
UIViewAutoresizingNone = 0,
UIViewAutoresizingFlexibleLeftMargin = 1 << 0,