Closed kylebshr closed 5 years ago
Hey @kylebshr thanks for the pull request.
My original implementation had two goals:
With your changes the latter is lost. I am just thinking how to reintroduce this while keeping your UIColor(dynamicProvider:)
changes.
My best idea so far is to reintroduce the 3rd parameter with a different shape. It could be an optional closure or a closure that returns an optional mode, where absence of value could mean using the system logic.
Feel free to do any change in this direction; otherwise I will try to help later today/tomorrow!
Thanks a lot for contributing and best regards.
@kylebshr how do you like it?
I think it is a nice compromise between a nice default simple API, customisation possibilities & backwards compatibility.
Hey, sorry I didn't have time to take a look sooner - seems like a good approach 👍
This creates a color that will auto-update on iOS 13, and falls back to the
light
color on any version less.I'm very unsure about my approach with the tests - what's best practice for testing different iOS versions behavior? Open to suggestions.