You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 24, 2019. It is now read-only.
Programatic invocations of startLoading should not cause the delegate method pullToRefreshViewDidStartLoading: to be called. This should only be called on user-initiated events.
Consider the following scenario given the above code:
View controller is sent viewDidAppear:
refresh is called to trigger a first load
startLoading is called so that the refresh control reflects the current loading state
pullToRefreshViewDidStartLoading: is called during the state transition
refresh is called again
SSPullToRefreshView prevents that from continuing in an infinite loop, but I now have multiple instances of refresh running for what should have been a single invocation.
The only way I have found around this is to override startLoading and wrap the call to super by temporarily removing the delegate. Alternatively, any consumer is required to track loading state to prevent a single invocation of refresh from firing multiple loads.