Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Allow not to use UIImageAsset on iOS 13 #88

Merged
merged 3 commits into from
Jul 24, 2020
Merged

Conversation

levinli303
Copy link
Member

@levinli303 levinli303 commented Jul 20, 2020

There's an issue: registering an UIImage with a content other than _UIImageCGImageContent will wipe out the images stored in UIImageAsset, so this PR allows to fallback to DynamicImage on iOS 13 with images.

Includes:

  1. Introducing useUIImageAsset in register/setup the dark mode manager, when off on iOS 13, it will use DynamicImage instead of UIImageAsset
  2. Override imageWithConfiguration: in DynamicImage for iOS 13, since the image fetched on iOS 13 does necessarily follow the overrideTraitCollection
  3. Move some swizzling method to private header

@levinli303
Copy link
Member Author

@zhuorantan @li-bei got time to review this PR?

Copy link
Collaborator

@zhuorantan zhuorantan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now.

@levinli303 levinli303 merged commit 5883735 into master Jul 24, 2020
@levinli303 levinli303 deleted the allow-for-no-image-asset branch July 24, 2020 09:32
@levinli303 levinli303 mentioned this pull request Jul 24, 2020
14 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants