Add better support for stateful view (UIButton) for image URL/progres s state management#3576
Merged
dreampiggy merged 2 commits intoSDWebImage:masterfrom Jul 31, 2023
Conversation
8 tasks
…s state management Key idea: 1. Image Loading pipeline is based on `operation key`, when start/cancel it always need operation key 2. Stateful view has multiple operation key for different image property, we can use KeyPath as the hint to generate operation key 3. To make exists API compatible, we do not change much, however, in 6.0 we may do refactory and store all the loadState/operation/result into the single object, instead of 3
dec9982 to
1c92951
Compare
Contributor
Author
|
The |
dreampiggy
commented
Nov 30, 2023
| * If you cancel current image load, the key will be set to nil. | ||
| * | ||
| * @note You can use method `UIView+WebCacheOperation` to investigate different queries' operation. | ||
| * @note For the history version compatible, when current UIView has property exactly called `image`, the operation key will use `NSStringFromClass(self.class)`. Include `UIImageView.image/NSImageView.image/NSButton.image` (without `UIButton`) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key idea:
operation key, when start/cancel it always need operation keyThis is the re-new of #2790
This close #2701
Related
This is the base need before #3569 been merged. Must merge this first then rebase that branch