Open mixdesign opened 6 months ago
Hey, thank you for the great feedback. Also thank you chiming in on this.
I would hope to integrate the whole style using the given trait collection (user interface style, accessibility contrast). I'd be more than happy to add support for these. Unfortunately I don't have time to write a full example, but what would you think about something following:
public var backgroundEffect: (TraitCollection) -> UIVisualEffect?
This would be similar to what UIColor has. UIColor has this great UIColor(dynamicProvider: (UITraitCollection) -> UIColor>)
constructor, but unfortunately UIVisualEffect
doesn't, at least to my knowledge. With this dynamic provider, we could get rid of the custom BackgroundEffectStyle
altogehter.
Generally I would think that people either care about the dark mode or don't. When they don't, they might skip setting the value which would lead to difficult to detect bugs in their apps. Similar to setting only a background color of a label to fixed value but not realizing that the text color is still dnyamic. WDYT?
Hey! Thanks for great lib which we use in our Sajda app for a long time.
We faced with a small limitation in
DrawerView
. When I would like to set abackgroundEffect
tosystemDefault
, for light mode I can not set it to.extraLight
or some other values iOS provides!So, this PR basically adds this customization for both dark and light modes, without changing the current behavior.
Regards.