pronebird / UIScrollView-InfiniteScroll

UIScrollView ∞ scroll category
MIT License
1.06k stars 148 forks source link

Fix for bug with activity indicator view being shown when it should not be #59

Closed nickbarba closed 6 years ago

nickbarba commented 7 years ago
 self.tableView.setShouldShowInfiniteScrollHandler { [weak self] _ -> Bool in
     return false
 }

Above code should not show activity indicator view when user scrolls.

Fixed so if should not show the infinite scroll, hiding the activity indicator.

pronebird commented 7 years ago

Hi,

Thanks for your contribution.

-finishInfiniteScroll always hides activity indicator. Activity indicator is displayed when state.loading = YES.

You should never have a state when state.loading = NO and activity indicator is visible.

If you have it, we need a way to reproduce it. Also, make sure you work with UI on main thread. It's a common mistake to work with UI from background thread and observe all kinds of weird inconsistencies.

nickbarba commented 7 years ago

I do have state.loading = NO and activity indicator is visible. Happens on first time scrolling to end of tableView and if I pass false because there is not additional content. I'll look to see if I can get a stripped down version of my code to share.

pronebird commented 7 years ago

I am not able to reproduce that in Example app (Swift). You can use example app from repository as a boilerplate to reproduce the bug that you experience.

pronebird commented 7 years ago

@nickbarba any luck reproducing this in stripped down version?

pronebird commented 6 years ago

Closing due to inactivity.