فهرست منبع

Replace old types into suggested types

MJ Lee 11 سال پیش
والد
کامیت
d244ad0c69

BIN
MJRefreshExample/MJRefreshExample.xcodeproj/project.xcworkspace/xcuserdata/mj.xcuserdatad/UserInterfaceState.xcuserstate


+ 11 - 11
MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshConst.h

@@ -24,18 +24,18 @@
 // 图片路径
 #define MJRefreshSrcName(file) [@"MJRefresh.bundle" stringByAppendingPathComponent:file]
 
-extern const CGFloat MJRefreshViewHeight;
-extern const CGFloat MJRefreshFastAnimationDuration;
-extern const CGFloat MJRefreshSlowAnimationDuration;
+UIKIT_EXTERN const CGFloat MJRefreshViewHeight;
+UIKIT_EXTERN const CGFloat MJRefreshFastAnimationDuration;
+UIKIT_EXTERN const CGFloat MJRefreshSlowAnimationDuration;
 
-extern NSString *const MJRefreshFooterPullToRefresh;
-extern NSString *const MJRefreshFooterReleaseToRefresh;
-extern NSString *const MJRefreshFooterRefreshing;
+UIKIT_EXTERN NSString *const MJRefreshFooterPullToRefresh;
+UIKIT_EXTERN NSString *const MJRefreshFooterReleaseToRefresh;
+UIKIT_EXTERN NSString *const MJRefreshFooterRefreshing;
 
-extern NSString *const MJRefreshHeaderPullToRefresh;
-extern NSString *const MJRefreshHeaderReleaseToRefresh;
-extern NSString *const MJRefreshHeaderRefreshing;
-extern NSString *const MJRefreshHeaderTimeKey;
+UIKIT_EXTERN NSString *const MJRefreshHeaderPullToRefresh;
+UIKIT_EXTERN NSString *const MJRefreshHeaderReleaseToRefresh;
+UIKIT_EXTERN NSString *const MJRefreshHeaderRefreshing;
+UIKIT_EXTERN NSString *const MJRefreshHeaderTimeKey;
 
-extern NSString *const MJRefreshContentOffset;
+UIKIT_EXTERN NSString *const MJRefreshContentOffset;
 extern NSString *const MJRefreshContentSize;

+ 4 - 4
MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshFooterView.m

@@ -184,19 +184,19 @@ - (void)setState:(MJRefreshState)state
 	}
 }
 
-- (int)totalDataCountInScrollView
+- (NSInteger)totalDataCountInScrollView
 {
-    int totalCount = 0;
+    NSInteger totalCount = 0;
     if ([self.scrollView isKindOfClass:[UITableView class]]) {
         UITableView *tableView = (UITableView *)self.scrollView;
         
-        for (int section = 0; section<tableView.numberOfSections; section++) {
+        for (NSInteger section = 0; section<tableView.numberOfSections; section++) {
             totalCount += [tableView numberOfRowsInSection:section];
         }
     } else if ([self.scrollView isKindOfClass:[UICollectionView class]]) {
         UICollectionView *collectionView = (UICollectionView *)self.scrollView;
         
-        for (int section = 0; section<collectionView.numberOfSections; section++) {
+        for (NSInteger section = 0; section<collectionView.numberOfSections; section++) {
             totalCount += [collectionView numberOfItemsInSection:section];
         }
     }