WXGBridgeQ / SwiftPullToRefresh

An easy way to implement pull-to-refresh feature based on UIScrollView extension, written in Swift 4.
MIT License
465 stars 55 forks source link

Changes in v2.4.5 broke indicator views when switching between tabs #22

Closed n3d1117 closed 6 years ago

n3d1117 commented 6 years ago

Hello!

Latest commit broke indicator views when switching between tabs, see here:

Sample project can be downloaded here.

Reverting to v2.4.4 works fine. I think the issue is that in v2.4.5 you moved the code to update tokens in RefreshView.swift from func willMove(toWindow newWindow: UIWindow?) to func willMove(toSuperview newSuperview: UIView?), but the latter isn't called when switching between tabs, so indicators are not updated properly.

A possible solution is to call the same code in both functions, but there should be a better one.

Thanks for your help!

WXGBridgeQ commented 6 years ago

Fixed in the new version 2.4.6 Thanks.