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
I just use the PullToRefresh and InfiniteScrolling just like normal in code. But in one of my view controller the Xcode tell me the observer not remove when the scrollview dealloc. It not crash but may make a leak. And all other view controller is working so good. It's weird.
But I finally find the issue.:tada::tada::tada:
When I set the showsInfiniteScrolling = YES or showsPullToRefresh = YES
before addPullToRefreshWithActionHandler or addInfiniteScrollingWithActionHandler
the scrollview will add observer twice and only remove once when it dealloc.
Because the condition in setShowsPullToRefreshandsetShowsInfiniteScrolling is like this if (!self.pullToRefreshView.isObserving) { if (!self.infiniteScrollingView.isObserving) {
Before you set the handler the pullToRefreshViewandinfiniteScrollingView is nil so the code run inside.
I just use the PullToRefresh and InfiniteScrolling just like normal in code. But in one of my view controller the Xcode tell me the observer not remove when the scrollview dealloc. It not crash but may make a leak. And all other view controller is working so good. It's weird.
But I finally find the issue.:tada::tada::tada:
When I set the
showsInfiniteScrolling = YES
orshowsPullToRefresh = YES
before
addPullToRefreshWithActionHandler
oraddInfiniteScrollingWithActionHandler
the scrollview will add observer twice and only remove once when it dealloc.
Because the condition in
setShowsPullToRefresh
andsetShowsInfiniteScrolling
is like thisif (!self.pullToRefreshView.isObserving) {
if (!self.infiniteScrollingView.isObserving) {
Before you set the handler the
pullToRefreshView
andinfiniteScrollingView
is nil so the code run inside.I already fix it and pull a request: #221
The text was updated successfully, but these errors were encountered: