pull-to-refresh icon indicating copy to clipboard operation
pull-to-refresh copied to clipboard

storyboad中tableView 含有header的情况 没有数据的情况下 会有上拉加载更多

Open coder-dongjiayi opened this issue 6 years ago • 3 comments

数据源为空(dataSource.count = 0) 的情况 1.在storyboad中创建tableView 并添加headerView

2.添加以下代码

tableView.es.addPullToRefresh { //下拉刷新 } tableView.es.addInfiniteScrolling { //上拉加载更多 } 3.上拉动作会触发 上拉加载更多

但是在tableView没有添加header的情况下 上拉不会触发上拉加载更多 demo https://pan.baidu.com/s/1eSPPV5C

tableView有 header 但是当数据源为空的时候 不希望 触发上拉加载更多的操作

coder-dongjiayi avatar Jan 22 '18 03:01 coder-dongjiayi

Same question, is there any solution?

ladmini avatar Apr 29 '20 05:04 ladmini

I think the following code can solve this problem

if dataSource.count == 0 {
    self.tableView.es.removeRefreshFooter()
}

ladmini avatar Apr 29 '20 05:04 ladmini

@ladmini 建议当self.tableView.footer.isHidden = true 不允许上拉了

josercc avatar Jun 19 '20 11:06 josercc