Skip to content

Commit

Permalink
解决少于一屏幕数据的时候,loadMore出现的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xhzengAIB committed Apr 19, 2015
1 parent b424d3b commit 2f6010f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ @interface XHSystemCollectionViewController ()

@implementation XHSystemCollectionViewController

- (void)viewDidLoad {
[super viewDidLoad];
self.collectionView.alwaysBounceVertical = YES;
}

#pragma mark - Publish Method

- (void)loadDataSource {
Expand Down
8 changes: 4 additions & 4 deletions RefreshControl/Manager/XHRefreshControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -701,13 +701,13 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
self.loadMoreView.frame = loadMoreViewFrame;
[self setScrollViewContentInsetForLoadMore];
} else {
CGFloat scrollViewHeight = CGRectGetHeight(self.scrollView.frame);
CGFloat thubs = scrollViewHeight - [self getAdaptorHeight];
if (contentSize.height >= thubs) {
// CGFloat scrollViewHeight = CGRectGetHeight(self.scrollView.frame);
// CGFloat thubs = scrollViewHeight - [self getAdaptorHeight];
// if (contentSize.height >= thubs) {
CGRect loadMoreViewFrame = self.loadMoreView.frame;
loadMoreViewFrame.origin.y = contentSize.height;
self.loadMoreView.frame = loadMoreViewFrame;
}
// }
}
}
}
Expand Down

0 comments on commit 2f6010f

Please sign in to comment.