Improve macOS implementation and minor improvement to the shared components. #52
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.
Set
wantsLayer
to true before trying to add an animationOn macOS, layers are optional, so with the current implementation we
assume that it is always there which is a wrong assumption. To fix this
issue, we now set
wantsLayer
totrue
before adding the animation.Use transition closure instead of setting the image
Setting the image again can cause the view to blink as it will render
the image on screen because the layer needs updating. By piggy backing
on
transitionClosure
, it will animate from one image to another, butonly if the old image exists. If the image view has no image, it will
simply assign the image to self as the previous implementation did.
Opt-out from setting the image again if the window is resizing.