WXGBridgeQ / SwiftPullToRefresh

An easy way to implement pull-to-refresh feature based on UIScrollView extension, written in Swift 4.
MIT License
465 stars 55 forks source link

spr_endRefreshingWithNoMoreData这个方法用着无效果 #7

Closed XHQFighting closed 7 years ago

XHQFighting commented 7 years ago

你新添加的,去除上拉加载的就是spr_endRefreshingWithNoMoreData这个方法吧,我试过了,并不能去除上啦加载呀?

    self.tableView?.spr_setIndicatorFooter { [weak self] in
        DispatchQueue.main.asyncAfter(wallDeadline: .now() + 2, execute: {
            YJDebugPrint("上啦加载更多")
            self?.tableView?.spr_endRefreshing()
        })
    }
    self.tableView?.spr_endRefreshingWithNoMoreData()

就像这样,仅仅添加,然后马上删除,也还是有上拉加载

WXGBridgeQ commented 7 years ago
self.tableView?.spr_setIndicatorFooter { [weak self] in
    DispatchQueue.main.asyncAfter(wallDeadline: .now() + 2, execute: {
        YJDebugPrint("上啦加载更多")
        self?.tableView?.spr_endRefreshingWithNoMoreData()
    })
}

@XHQFighting