-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iOS17+ fix: Move data refresh from
viewDidLoad
to new ViewControlle…
…r's `viewIsAppearing` lifecycle method - This change is needed since UIRefreshControl updates must happen when the view is on-screen on iOS17+ (it ignores updates otherwise!). - `viewDidLoad` is called once per VC, but the new `viewIsAppearing` may be called multiple times - so we added logic to ensure the refresh only happens in the first `viewIsAppearing` occurrence to mimic the previous behavior in `viewDidLoad`. - When running tests, the views are never added on-screen, so UIRefreshControl doesn't work as expected on iOS 17+. To allow testability, we replace the UIRefreshControl with a UIRefreshControlSpy test-double.
- Loading branch information
Showing
5 changed files
with
131 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.