Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HomeViewController crashes in iOS12 and lower when trying to refresh #98

Open
jdisho opened this issue Oct 27, 2019 · 0 comments
Open
Labels

Comments

@jdisho
Copy link
Owner

jdisho commented Oct 27, 2019

As @serjooo mentioned:

App crashes still on iOS 12 in the HomeViewController on line 82:

outputs.isRefreshing
.execute { [weak self] isRefreshing in
    if isRefreshing {
        self?.collectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .top, animated: false)
        self?.collectionView.setContentOffset(CGPoint(x: 0.0, y: -(self?.refreshControl.frame.height ?? 0.0)), animated: true)
    } else {
        self?.collectionView.setContentOffset(.zero, animated: true)
    }
}
.bind(to: refreshControl.rx.isRefreshing)
.disposed(by: disposeBag)

Commenting out the isRefreshing code solves the problem as the app crashes on scrolling logic.

@jdisho jdisho changed the title Papr crashes in iOS12 and lower when trying to refresh HomeViewController crashes in iOS12 and lower when trying to refresh Oct 27, 2019
@jdisho jdisho added the bug label Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant