PullToRefresh
PullToRefresh copied to clipboard
Crash on range bounds if refresh view height is greater than 1000
Report a bug
What did you do?
Refresh view with height greater than 1000
What did you expect to happen?
Refresh should be performed without any issues.
What happened instead?
Code crashed with error: "Fatal error: Range requires lowerBound <= upperBound"
Crash occured in file PullToRefresh line 178
Proposed solution
As a quick fix I have replaced line 177 that was:
let refreshViewHeight = refreshView.frame.size.height
with
let refreshViewHeight = refreshView.frame.size.height < 1000 ? refreshView.frame.size.height : 999