Call endRefreshing(at: .top) has no effect
If I only add PullToRefresh on top and not bottom, then calling endRefreshing(at: .top) will have no effect.
In addition, if the top constraint of scrollView can follow the height-change of the navigation bar (make.edges.equalToSuperview()), like Twitter or YouTube app, scrollview will bounce and other problems.
func endRefreshing() { // guard isEnabled else { return }
if state == .loading {
state = .finished
}
}
去掉
If I only add PullToRefresh on top and not bottom, then calling
endRefreshing(at: .top)will have no effect.In addition, if the top constraint of scrollView can follow the height-change of the navigation bar (
make.edges.equalToSuperview()), like Twitter or YouTube app, scrollview will bounce and other problems.
Invoke refreshControl.setEnable(isEnabled: true) before calling endRefreshing(at: .top).