Kaynağa Gözat

Deprecate noticeNoMoreData

Change noticeNoMoreData into endRefreshingWithNoMoreData
MJLee 10 yıl önce
ebeveyn
işleme
cca04cb867

+ 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.11'
+    s.version      = '2.4.12'
     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'

+ 3 - 1
MJRefresh/Base/MJRefreshFooter.h

@@ -16,7 +16,9 @@
 + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;
 + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;
 
 
 /** 提示没有更多的数据 */
 /** 提示没有更多的数据 */
-- (void)noticeNoMoreData;
+- (void)endRefreshingWithNoMoreData;
+- (void)noticeNoMoreData MJRefreshDeprecated("使用endRefreshingWithNoMoreData");
+
 /** 重置没有更多的数据(消除没有更多数据的状态) */
 /** 重置没有更多的数据(消除没有更多数据的状态) */
 - (void)resetNoMoreData;
 - (void)resetNoMoreData;
 
 

+ 6 - 1
MJRefresh/Base/MJRefreshFooter.m

@@ -55,11 +55,16 @@ - (void)willMoveToSuperview:(UIView *)newSuperview
 }
 }
 
 
 #pragma mark - 公共方法
 #pragma mark - 公共方法
-- (void)noticeNoMoreData
+- (void)endRefreshingWithNoMoreData
 {
 {
     self.state = MJRefreshStateNoMoreData;
     self.state = MJRefreshStateNoMoreData;
 }
 }
 
 
+- (void)noticeNoMoreData
+{
+    [self endRefreshingWithNoMoreData];
+}
+
 - (void)resetNoMoreData
 - (void)resetNoMoreData
 {
 {
     self.state = MJRefreshStateIdle;
     self.state = MJRefreshStateIdle;

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


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

@@ -329,7 +329,7 @@ - (void)loadLastData
         [self.tableView reloadData];
         [self.tableView reloadData];
         
         
         // 拿到当前的上拉刷新控件,变为没有更多数据的状态
         // 拿到当前的上拉刷新控件,变为没有更多数据的状态
-        [self.tableView.footer noticeNoMoreData];
+        [self.tableView.footer endRefreshingWithNoMoreData];
     });
     });
 }
 }