Open Jenus opened 7 years ago
In order to display "no More Data" footer to append the first page[ e.g. 5 items/ 10 paging]. In-depth, noMoreData setter method should notify ESRefreshFooterView::offsetChangeAction, so it is reasonable to make independent call "noticeNoMoreData".
so fixit can replaced with the following : //++++++++++++++++++++ if noMoreData { //不满一页的时候,需要加载 if scrollView.contentSize.height > 0.0 self.alpha = 1.0 } //++++++++++++++++++++----end
and,
open var noMoreData = false { didSet { if noMoreData != oldValue { self.animator.refresh(view: self, stateDidChange: noMoreData ? .noMoreData : .pullToRefresh)
@eggswift,
could you confirm this as one problem? If so, I will expect it fix as soon as possible with new pod. Thanks
@Jenus you can use DZNEmptyDataSet for it
Same request.
Can not use DZNEmptyDataSet, because first page has data, just data count less than page size, so need to call noMoreData in first page.
Hi, there was one condition to show nomoredata. All data was fetched when first loading. "scrollView.contentOffset.y + scrollView.contentInset.top ==0" made "self.alpha = 0.0"; when scroll the tableview, enter the condition of instant return. so the footer with nomoredata was 0 alpha, did not display.
The following was one fix:
guard isRefreshing == false && isAutoRefreshing == false && noMoreData == false && isHidden == false else { //++++++++++++++++++++ if noMoreData { //不满一页的时候,需要加载 if scrollView.contentSize.height <= 0.0 || scrollView.contentOffset.y + scrollView.contentInset.top <= 0.0 { self.alpha = 0.0 } else { self.alpha = 1.0 } } //++++++++++++++++++++----end