iOS 枚举写法

1.一种

typedef enum {

    kPRStateNormal = 0,

    kPRStatePulling = 1,

    kPRStateLoading = 2,

    kPRStateHitTheEnd = 3

} PRState;

2.第二种

typedef NS_ENUM(NSInteger,PRState){

        kPRStateNormal = 0,

        kPRStatePulling = 1,

        kPRStateLoading = 2,

        kPRStateHitTheEnd = 3

};

原文地址:https://www.cnblogs.com/liuting-1204/p/5752953.html