Skip to content

Crash on range bounds if refresh view height is greater than 1000 #129

@twronka

Description

@twronka

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions