Bladeren bron

Delete unused method in UIScrollView+MJRefresh (#1269)

Kinarobin 6 jaren geleden
bovenliggende
commit
c54c4d8f1a

+ 1 - 1
MJRefresh/UIScrollView+MJRefresh.h

@@ -22,5 +22,5 @@
 
 #pragma mark - other
 - (NSInteger)mj_totalDataCount;
-//@property (copy, nonatomic) void (^mj_reloadDataBlock)(NSInteger totalDataCount);
+
 @end

+ 2 - 62
MJRefresh/UIScrollView+MJRefresh.m

@@ -12,20 +12,6 @@
 #import "MJRefreshFooter.h"
 #import <objc/runtime.h>
 
-@implementation NSObject (MJRefresh)
-
-+ (void)exchangeInstanceMethod1:(SEL)method1 method2:(SEL)method2
-{
-    method_exchangeImplementations(class_getInstanceMethod(self, method1), class_getInstanceMethod(self, method2));
-}
-
-+ (void)exchangeClassMethod1:(SEL)method1 method2:(SEL)method2
-{
-    method_exchangeImplementations(class_getClassMethod(self, method1), class_getClassMethod(self, method2));
-}
-
-@end
-
 @implementation UIScrollView (MJRefresh)
 
 #pragma mark - header
@@ -88,6 +74,7 @@ - (MJRefreshHeader *)header
 {
     return self.mj_header;
 }
+
 #pragma mark - other
 - (NSInteger)mj_totalDataCount
 {
@@ -107,52 +94,5 @@ - (NSInteger)mj_totalDataCount
     }
     return totalCount;
 }
-@end
-//static const char MJRefreshReloadDataBlockKey = '\0';
-//- (void)setMj_reloadDataBlock:(void (^)(NSInteger))mj_reloadDataBlock
-//{
-//    [self willChangeValueForKey:@"mj_reloadDataBlock"]; // KVO
-//    objc_setAssociatedObject(self, &MJRefreshReloadDataBlockKey, mj_reloadDataBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
-//    [self didChangeValueForKey:@"mj_reloadDataBlock"]; // KVO
-//}
-//
-//- (void (^)(NSInteger))mj_reloadDataBlock
-//{
-//    return objc_getAssociatedObject(self, &MJRefreshReloadDataBlockKey);
-//}
-
-//- (void)executeReloadDataBlock
-//{
-//    !self.mj_reloadDataBlock ? : self.mj_reloadDataBlock(self.mj_totalDataCount);
-//}
-//@end
-//
-//@implementation UITableView (MJRefresh)
-//
-//+ (void)load
-//{
-//    [self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
-//}
-//
-//- (void)mj_reloadData
-//{
-//    [self mj_reloadData];
-//
-//    [self executeReloadDataBlock];
-//}
-//@end
 
-//@implementation UICollectionView (MJRefresh)
-//
-//+ (void)load
-//{
-//    [self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
-//}
-//
-//- (void)mj_reloadData
-//{
-//    [self mj_reloadData];
-//
-//    [self executeReloadDataBlock];
-//}
-//@end
+@end

+ 1 - 1
MJRefreshExample.xcodeproj/project.pbxproj

@@ -600,7 +600,7 @@
 			};
 			buildConfigurationList = 2DA7F9201AA6B4C4005627AB /* Build configuration list for PBXProject "MJRefreshExample" */;
 			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
+			developmentRegion = en;
 			hasScannedForEncodings = 0;
 			knownRegions = (
 				en,