Selaa lähdekoodia

苹果官方枚举建议用 NS_ENUM 和NS_OPTIONS ,详情见https://developer.apple.com/library/ios/releasenotes/ObjectiveC/ModernizationObjC/AdoptingModernObjective-C/AdoptingModernObjective-C.html

张德荣 10 vuotta sitten
vanhempi
commit
51e45225d5
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      MJRefresh/Base/MJRefreshComponent.h

+ 2 - 2
MJRefresh/Base/MJRefreshComponent.h

@@ -14,7 +14,7 @@
 #import "UIScrollView+MJRefresh.h"
 
 /** 刷新控件的状态 */
-typedef enum {
+typedef NS_ENUM(NSInteger, MJRefreshState) {
     /** 普通闲置状态 */
     MJRefreshStateIdle = 1,
     /** 松开就可以进行刷新的状态 */
@@ -25,7 +25,7 @@ typedef enum {
     MJRefreshStateWillRefresh,
     /** 所有数据加载完毕,没有更多的数据了 */
     MJRefreshStateNoMoreData
-} MJRefreshState;
+};
 
 /** 进入刷新状态的回调 */
 typedef void (^MJRefreshComponentRefreshingBlock)();