Customize backgroundEffect blur styles for BackgroundEffectStyle.systemDefault#66
Customize backgroundEffect blur styles for BackgroundEffectStyle.systemDefault#66mixdesign wants to merge 1 commit intomkko:masterfrom
Conversation
…ctStyle for DrawerView
| } | ||
|
|
||
| /// The background blur effect style for light mode. | ||
| public var lightBlurEffectStyle: UIBlurEffect.Style = .light { |
There was a problem hiding this comment.
Sure, for some reason developers may set a dark style for light mode, but, seems like we shouldn't make a limitation on it, because for some kind of Themes, developers may want to set .light for dark mode and .extraLight for light mode. You know what I mean? :)
|
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 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 abackgroundEffecttosystemDefault, for light mode I can not set it to.extraLightor some other values iOS provides!So, this PR basically adds this customization for both dark and light modes, without changing the current behavior.
Regards.