From de8015bdf0a07bc37f946c2228415030670a53cf Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 9 Jun 2014 21:43:08 +0000 Subject: [PATCH] fix the auto load more conver manual. --- .../MessageDisplayExample.xcodeproj/project.pbxproj | 8 ++++---- .../Classes/Views/RefreshViews/XHLoadMoreView.h | 2 ++ .../Classes/Views/RefreshViews/XHLoadMoreView.m | 5 +++++ .../Classes/Views/RefreshViews/XHRefreshControl.m | 9 +++++---- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Example/MessageDisplayExample/MessageDisplayExample.xcodeproj/project.pbxproj b/Example/MessageDisplayExample/MessageDisplayExample.xcodeproj/project.pbxproj index 98c8105..6a778ae 100644 --- a/Example/MessageDisplayExample/MessageDisplayExample.xcodeproj/project.pbxproj +++ b/Example/MessageDisplayExample/MessageDisplayExample.xcodeproj/project.pbxproj @@ -2376,14 +2376,14 @@ AB41A58F194274840095C12C /* RefreshViews */ = { isa = PBXGroup; children = ( - AB41A590194274950095C12C /* XHRefreshCircleView.h */, - AB41A591194274950095C12C /* XHRefreshCircleView.m */, + ABBA5D0A19427D96008BA06D /* XHRefreshControl.h */, + ABBA5D0B19427D96008BA06D /* XHRefreshControl.m */, AB41A595194274AC0095C12C /* XHRefreshView.h */, AB41A596194274AC0095C12C /* XHRefreshView.m */, + AB41A590194274950095C12C /* XHRefreshCircleView.h */, + AB41A591194274950095C12C /* XHRefreshCircleView.m */, AB41A59A194279380095C12C /* XHLoadMoreView.h */, AB41A59B194279380095C12C /* XHLoadMoreView.m */, - ABBA5D0A19427D96008BA06D /* XHRefreshControl.h */, - ABBA5D0B19427D96008BA06D /* XHRefreshControl.m */, ); path = RefreshViews; sourceTree = ""; diff --git a/MessageDisplayKit/Classes/Views/RefreshViews/XHLoadMoreView.h b/MessageDisplayKit/Classes/Views/RefreshViews/XHLoadMoreView.h index e058288..9fdb2dd 100644 --- a/MessageDisplayKit/Classes/Views/RefreshViews/XHLoadMoreView.h +++ b/MessageDisplayKit/Classes/Views/RefreshViews/XHLoadMoreView.h @@ -18,4 +18,6 @@ - (void)endLoading; +- (void)configuraManualState; + @end diff --git a/MessageDisplayKit/Classes/Views/RefreshViews/XHLoadMoreView.m b/MessageDisplayKit/Classes/Views/RefreshViews/XHLoadMoreView.m index 627c8ca..5617e4f 100644 --- a/MessageDisplayKit/Classes/Views/RefreshViews/XHLoadMoreView.m +++ b/MessageDisplayKit/Classes/Views/RefreshViews/XHLoadMoreView.m @@ -28,6 +28,11 @@ - (void)endLoading { [self.activityIndicatorView stopAnimating]; } +- (void)configuraManualState { + self.hidden = NO; + [self.loadMoreButton setTitle:@"显示下20条" forState:UIControlStateNormal]; +} + #pragma mark - Propertys - (UIButton *)loadMoreButton { diff --git a/MessageDisplayKit/Classes/Views/RefreshViews/XHRefreshControl.m b/MessageDisplayKit/Classes/Views/RefreshViews/XHRefreshControl.m index 8b9d1ae..7f9986f 100644 --- a/MessageDisplayKit/Classes/Views/RefreshViews/XHRefreshControl.m +++ b/MessageDisplayKit/Classes/Views/RefreshViews/XHRefreshControl.m @@ -98,10 +98,11 @@ - (void)endPullDownRefreshing { #pragma mark - Load More Refreshing Method - (void)startLoadMoreRefreshing { - NSLog(@"进入上提多少次"); - // if (self.loadMoreRefreshedCount < self.autoLoadMoreRefreshedCount) { - [self callBeginLoadMoreRefreshing]; - // } + if (self.loadMoreRefreshedCount < self.autoLoadMoreRefreshedCount) { + [self callBeginLoadMoreRefreshing]; + } else { + [self.loadMoreView configuraManualState]; + } } - (void)callBeginLoadMoreRefreshing {