codeandtheory / YCoreUI

Core components for iOS and tvOS to accelerate building user interfaces in code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add optional rendering mode to SystemImage

mpospese opened this issue · comments

Let's expand the functionality of our system image loading protocol to include rendering mode.
(Theoretically we could also expand this to ImageAsset, but catalog assets can already specify rendering mode in the asset.)

  • Add property public static var renderingMode: UIImage.RenderingMode? { get }
  • Default implementation is { nil }
  • Modify loadImage() to check renderingMode and if non-nil, modify the returned image with .withRenderingMode(:)

This will let users set the rendering mode on an entire group (enum) of images.
This will be useful in YStepper and YCalendarPicker.