فهرست منبع

Remove some bad methods

Remove some bad methods
MJLee 10 سال پیش
والد
کامیت
bcccfc7511

+ 1 - 1
MJRefresh.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
 Pod::Spec.new do |s|
     s.name         = 'MJRefresh'
     s.name         = 'MJRefresh'
-    s.version      = '2.4.9'
+    s.version      = '2.4.10'
     s.summary      = 'The easiest way to use pull-to-refresh'
     s.summary      = 'The easiest way to use pull-to-refresh'
     s.homepage     = 'https://github.com/CoderMJLee/MJRefresh'
     s.homepage     = 'https://github.com/CoderMJLee/MJRefresh'
     s.license      = 'MIT'
     s.license      = 'MIT'

+ 1 - 1
MJRefresh/MJRefreshConst.h

@@ -13,7 +13,7 @@
 // 过期提醒
 // 过期提醒
 #define MJRefreshDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)
 #define MJRefreshDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)
 
 
-// 运行时objc_MJRefreshMsgSend
+// 运行时objc_msgSend
 #define MJRefreshMsgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__)
 #define MJRefreshMsgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__)
 #define MJRefreshMsgTarget(target) (__bridge void *)(target)
 #define MJRefreshMsgTarget(target) (__bridge void *)(target)
 
 

+ 0 - 96
MJRefresh/UIScrollView+MJRefresh.m

@@ -116,12 +116,6 @@ @implementation UITableView (MJRefresh)
 + (void)load
 + (void)load
 {
 {
     [self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
     [self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
-    [self exchangeInstanceMethod1:@selector(reloadRowsAtIndexPaths:withRowAnimation:) method2:@selector(mj_reloadRowsAtIndexPaths:withRowAnimation:)];
-    [self exchangeInstanceMethod1:@selector(deleteRowsAtIndexPaths:withRowAnimation:) method2:@selector(mj_deleteRowsAtIndexPaths:withRowAnimation:)];
-    [self exchangeInstanceMethod1:@selector(insertRowsAtIndexPaths:withRowAnimation:) method2:@selector(mj_insertRowsAtIndexPaths:withRowAnimation:)];
-    [self exchangeInstanceMethod1:@selector(reloadSections:withRowAnimation:) method2:@selector(mj_reloadSections:withRowAnimation:)];
-    [self exchangeInstanceMethod1:@selector(deleteSections:withRowAnimation:) method2:@selector(mj_deleteSections:withRowAnimation:)];
-    [self exchangeInstanceMethod1:@selector(insertSections:withRowAnimation:) method2:@selector(mj_insertSections:withRowAnimation:)];
 }
 }
 
 
 - (void)mj_reloadData
 - (void)mj_reloadData
@@ -130,48 +124,6 @@ - (void)mj_reloadData
     
     
     [self executeReloadDataBlock];
     [self executeReloadDataBlock];
 }
 }
-
-- (void)mj_insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
-{
-    [self mj_insertRowsAtIndexPaths:indexPaths withRowAnimation:animation];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
-{
-    [self mj_deleteRowsAtIndexPaths:indexPaths withRowAnimation:animation];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
-{
-    [self mj_reloadRowsAtIndexPaths:indexPaths withRowAnimation:animation];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
-{
-    [self mj_insertSections:sections withRowAnimation:animation];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
-{
-    [self mj_deleteSections:sections withRowAnimation:animation];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
-{
-    [self mj_reloadSections:sections withRowAnimation:animation];
-    
-    [self executeReloadDataBlock];
-}
 @end
 @end
 
 
 @implementation UICollectionView (MJRefresh)
 @implementation UICollectionView (MJRefresh)
@@ -179,12 +131,6 @@ @implementation UICollectionView (MJRefresh)
 + (void)load
 + (void)load
 {
 {
     [self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
     [self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
-    [self exchangeInstanceMethod1:@selector(reloadItemsAtIndexPaths:) method2:@selector(mj_reloadItemsAtIndexPaths:)];
-    [self exchangeInstanceMethod1:@selector(insertItemsAtIndexPaths:) method2:@selector(mj_insertItemsAtIndexPaths:)];
-    [self exchangeInstanceMethod1:@selector(deleteItemsAtIndexPaths:) method2:@selector(mj_deleteItemsAtIndexPaths:)];
-    [self exchangeInstanceMethod1:@selector(reloadSections:) method2:@selector(mj_reloadSections:)];
-    [self exchangeInstanceMethod1:@selector(insertSections:) method2:@selector(mj_insertSections:)];
-    [self exchangeInstanceMethod1:@selector(deleteSections:) method2:@selector(mj_deleteSections:)];
 }
 }
 
 
 - (void)mj_reloadData
 - (void)mj_reloadData
@@ -193,46 +139,4 @@ - (void)mj_reloadData
     
     
     [self executeReloadDataBlock];
     [self executeReloadDataBlock];
 }
 }
-
-- (void)mj_insertSections:(NSIndexSet *)sections
-{
-    [self mj_insertSections:sections];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_deleteSections:(NSIndexSet *)sections
-{
-    [self mj_deleteSections:sections];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_reloadSections:(NSIndexSet *)sections
-{
-    [self mj_reloadSections:sections];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_insertItemsAtIndexPaths:(NSArray *)indexPaths
-{
-    [self mj_insertItemsAtIndexPaths:indexPaths];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_deleteItemsAtIndexPaths:(NSArray *)indexPaths
-{
-    [self mj_deleteItemsAtIndexPaths:indexPaths];
-    
-    [self executeReloadDataBlock];
-}
-
-- (void)mj_reloadItemsAtIndexPaths:(NSArray *)indexPaths
-{
-    [self mj_reloadItemsAtIndexPaths:indexPaths];
-    
-    [self executeReloadDataBlock];
-}
 @end
 @end

+ 0 - 4
MJRefreshExample/MJRefreshExample.xcodeproj/project.pbxproj

@@ -7,7 +7,6 @@
 	objects = {
 	objects = {
 
 
 /* Begin PBXBuildFile section */
 /* Begin PBXBuildFile section */
-		2D30C3B21B2BE95E00A207DF /* MJTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D30C3B11B2BE95E00A207DF /* MJTableViewCell.xib */; };
 		2D415E6E1B81ECC30068038E /* MJExampleWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D415E6D1B81ECC30068038E /* MJExampleWindow.m */; };
 		2D415E6E1B81ECC30068038E /* MJExampleWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D415E6D1B81ECC30068038E /* MJExampleWindow.m */; };
 		2D4A99A71AB1727900828496 /* MJWebViewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D4A99A51AB1727900828496 /* MJWebViewViewController.m */; };
 		2D4A99A71AB1727900828496 /* MJWebViewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D4A99A51AB1727900828496 /* MJWebViewViewController.m */; };
 		2D4A99A81AB1727900828496 /* MJWebViewViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D4A99A61AB1727900828496 /* MJWebViewViewController.xib */; };
 		2D4A99A81AB1727900828496 /* MJWebViewViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D4A99A61AB1727900828496 /* MJWebViewViewController.xib */; };
@@ -64,7 +63,6 @@
 /* End PBXContainerItemProxy section */
 /* End PBXContainerItemProxy section */
 
 
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
-		2D30C3B11B2BE95E00A207DF /* MJTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MJTableViewCell.xib; sourceTree = "<group>"; };
 		2D415E6C1B81ECC30068038E /* MJExampleWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJExampleWindow.h; sourceTree = "<group>"; };
 		2D415E6C1B81ECC30068038E /* MJExampleWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJExampleWindow.h; sourceTree = "<group>"; };
 		2D415E6D1B81ECC30068038E /* MJExampleWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MJExampleWindow.m; sourceTree = "<group>"; };
 		2D415E6D1B81ECC30068038E /* MJExampleWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MJExampleWindow.m; sourceTree = "<group>"; };
 		2D4A99A41AB1727900828496 /* MJWebViewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJWebViewViewController.h; sourceTree = "<group>"; };
 		2D4A99A41AB1727900828496 /* MJWebViewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJWebViewViewController.h; sourceTree = "<group>"; };
@@ -314,7 +312,6 @@
 			children = (
 			children = (
 				2DA7F95F1AA6BCD2005627AB /* MJTableViewController.h */,
 				2DA7F95F1AA6BCD2005627AB /* MJTableViewController.h */,
 				2DA7F9601AA6BCD2005627AB /* MJTableViewController.m */,
 				2DA7F9601AA6BCD2005627AB /* MJTableViewController.m */,
-				2D30C3B11B2BE95E00A207DF /* MJTableViewCell.xib */,
 				2DF7EA0A1AA8C273008580B4 /* MJCollectionViewController.h */,
 				2DF7EA0A1AA8C273008580B4 /* MJCollectionViewController.h */,
 				2DF7EA0B1AA8C273008580B4 /* MJCollectionViewController.m */,
 				2DF7EA0B1AA8C273008580B4 /* MJCollectionViewController.m */,
 				2D4A99A41AB1727900828496 /* MJWebViewViewController.h */,
 				2D4A99A41AB1727900828496 /* MJWebViewViewController.h */,
@@ -468,7 +465,6 @@
 			isa = PBXResourcesBuildPhase;
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
-				2D30C3B21B2BE95E00A207DF /* MJTableViewCell.xib in Resources */,
 				2DA7F9341AA6B4C4005627AB /* Main.storyboard in Resources */,
 				2DA7F9341AA6B4C4005627AB /* Main.storyboard in Resources */,
 				2D7780F51B2C1DE4009EF21B /* MJRefresh.bundle in Resources */,
 				2D7780F51B2C1DE4009EF21B /* MJRefresh.bundle in Resources */,
 				2D4A99A81AB1727900828496 /* MJWebViewViewController.xib in Resources */,
 				2D4A99A81AB1727900828496 /* MJWebViewViewController.xib in Resources */,

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


+ 0 - 36
MJRefreshExample/MJRefreshExample/Classes/MJTableViewCell.xib

@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8121.17" systemVersion="14E33b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" id="yyt-16-yhR">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
-            <autoresizingMask key="autoresizingMask"/>
-            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yyt-16-yhR" id="Jc6-wb-5WA">
-                <rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <view alpha="0.20000000000000001" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ard-TX-Wby">
-                        <rect key="frame" x="0.0" y="42.5" width="320" height="1"/>
-                        <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
-                        <constraints>
-                            <constraint firstAttribute="height" constant="1" id="Gln-Pv-grP"/>
-                        </constraints>
-                    </view>
-                </subviews>
-                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                <constraints>
-                    <constraint firstItem="Ard-TX-Wby" firstAttribute="leading" secondItem="Jc6-wb-5WA" secondAttribute="leading" id="FNw-KA-Jb8"/>
-                    <constraint firstAttribute="bottom" secondItem="Ard-TX-Wby" secondAttribute="bottom" id="x2L-Le-r3T"/>
-                    <constraint firstAttribute="trailing" secondItem="Ard-TX-Wby" secondAttribute="trailing" id="ztH-4r-YbT"/>
-                </constraints>
-            </tableViewCellContentView>
-            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-            <point key="canvasLocation" x="492" y="343"/>
-        </tableViewCell>
-    </objects>
-</document>

+ 1 - 1
MJRefreshExample/MJRefreshExample/Classes/MJTableViewController.m

@@ -368,7 +368,7 @@ - (void)viewDidLoad
     [super viewDidLoad];
     [super viewDidLoad];
     
     
     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
-    [self.tableView registerNib:[UINib nibWithNibName:@"MJTableViewCell" bundle:nil] forCellReuseIdentifier:@"cell"];
+    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
     MJPerformSelectorLeakWarning(
     MJPerformSelectorLeakWarning(
         [self performSelector:NSSelectorFromString(self.method) withObject:nil];
         [self performSelector:NSSelectorFromString(self.method) withObject:nil];
                                  );
                                  );