Papr
Papr copied to clipboard
HomeViewController crashes in iOS12 and lower when trying to refresh
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.