static const NSTimeInterval kAnimationDuration = 0.3;
複製代碼
extern NSString *const EOCStringConstant;
複製代碼
在實現文件中數組
NSString *const EOCStringConstant = @"VALUE";
複製代碼
enum EOCConnectionState {
EOCConnectionStateDisconnected,
EOCConnectionStateDisconnecting,
EOCConnectionStateconnected
};
typedef enum EOCConnectionState EOCConnectionState;
複製代碼
enum UIViewAutoresizing {
UIViewAutoresizingNone = 0,
UIViewAutoresizingFlexibleLeftMargin = 1 << 0,
UIViewAutoresizingFlexibleWidth = 1 << 1,
UIViewAutoresizingFlexibleRightMargin = 1 << 2,
UIViewAutoresizingFlexibleTopMargin = 1 << 3,
UIViewAutoresizingFlexibleHeight = 1 << 4,
UIViewAutoresizingFlexibleBottomMargin = 1 << 5
};
複製代碼
typedef NS_ENUM(NSUInteger, EOCConnectionState) {
EOCConnectionStateDisconnected = 1,
EOCConnectionStateDisconnecting,
EOCConnectionStateconnected
};
typedef NS_OPTIONS(NSUInteger, UIViewAutoresizing) {
UIViewAutoresizingNone = 0,
UIViewAutoresizingFlexibleLeftMargin = 1 << 0,
UIViewAutoresizingFlexibleWidth = 1 << 1,
UIViewAutoresizingFlexibleRightMargin = 1 << 2,
UIViewAutoresizingFlexibleTopMargin = 1 << 3,
UIViewAutoresizingFlexibleHeight = 1 << 4,
UIViewAutoresizingFlexibleBottomMargin = 1 << 5
}
複製代碼
switch (_currentState) {
case EOCConnectionStateDisconnected:
break;
case EOCConnectionStateDisconnecting:
break;
case EOCConnectionStateconnected:
break;
}
複製代碼