-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release cell reference on
prepareForReuse
as a fix for iOS 15+ cell…
… lifecycle changes. On iOS 15+, for performance reasons, the table view data source may create cells ahead of time using the `cellForRow` method. So the cell may be created but never go through the whole `willDisplayCell/didEndDisplaying` lifecycle callbacks as it may never be displayed. However, we start loading the cell image on `cellForRow` and only cancel the request on `didEndDisplaying`. In such cases, there can be a race condition when reusing a cell that was never displayed because the request would carry on and potentially load the wrong image at the wrong index path.
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 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
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