 对枚举的理解

2018-05-03  本文已影响5人  Dayu大鱼

3.如何理解

define NS_ENUM(...) CF_ENUM(__VA_ARGS__)

typedef NS_ENUM(NSInteger, JDStatusBarAnimationType) {
    JDStatusBarAnimationTypeNone,   /// Notification won't animate
    JDStatusBarAnimationTypeMove,   /// Notification will move in from the top, and move out again to the top
    JDStatusBarAnimationTypeBounce, /// Notification will fall down from the top and bounce a little bit
    JDStatusBarAnimationTypeFade    /// Notification will fade in and fade out
};

使用场景: 使其能够使用 .fade

style?.animationType = .fade

上一篇下一篇

猜你喜欢

热点阅读