samvermette / SVPullToRefresh

Give pull-to-refresh & infinite scrolling to any UIScrollView with 1 line of code.
http://samvermette.com/314
MIT License
4.82k stars 1.09k forks source link

addInfiniteScrollingWithActionHandler not getting called #243

Open funwithprogramming opened 9 years ago

funwithprogramming commented 9 years ago

addInfiniteScrollingWithActionHandler is not getting called second time and network indicator keeps on animating. What could be the problem?

eridbardhaj commented 9 years ago

+1, Same issue too, I can load more just one time. The other time, the indicator stuck animating, and no action is being called

BillHu commented 9 years ago

+1

divya-ai commented 9 years ago

+1

damln commented 9 years ago

+1, using version 0.4.1 with CocoaPods

VitalyTimofeev commented 9 years ago

Be sure you called stopAnimating for infiniteScrollingView. From readme:

[tableView addInfiniteScrollingWithActionHandler:^{
    // append data to data source, insert new cells at the end of table view
    // call [tableView.infiniteScrollingView stopAnimating] when done
}];
alanfeng99 commented 9 years ago

+1, it's not called, so the indicator would keep spinning.

amna-malik commented 9 years ago

I'm facing the same issue, the indicator keeps loading and action handle not fired second time.

pjryan93 commented 9 years ago

You need to call [self.collectionView.infiniteScrollingView stopAnimating];

The problem is the state of InfitieScorllView is not being updated to stopped. It will not trigger the action handler unless the state is set to stopped. Calling stopAnimating after your action handler is completed resets the state.

kihab commented 8 years ago

Calling [self.tableView.infiniteScrollingView stopAnimating];

Fixed the issue for me.