Closed JanBrinker closed 4 years ago
Thanks for bringing this up. I need to add something to handle this.
I added SwiftMessages.Config.overrideUserInterfaceStyle
on the head of master
if you want to give it a try.
@wtmoose any update on this? i am not able to show dark mode message UI using SwiftMessages.show(config: config, view: messageView)
.
Please let me know.
i am not seeing SwiftMessages.Config.overrideUserInterfaceStyle
in library now.
The ball is in your court. As I said, the feature is on the head of master
. Try entering overrideUserInterfaceStyle
in the search box.
Thanks, i had to install master branch pod.
pod 'SwiftMessages',:git => 'https://github.com/SwiftKickMobile/SwiftMessages.git', :branch => 'master'
Included in 8.0.0 release
So I guess we're all currently in the phase of stumbling all over weird kinks of iOS 13. The app I'm working on right now is not dark mode ready, so we overrode the user interface style in our app delegate:
This does the trick, however at one place we use SwiftMessages like this:
Now if my phone is set to dark mode iOS will try to use dark mode colors for UI elements inside even though I overrode the user interface style for the window. If I use
.view(someView)
forpresentationContext
the label colors in the view are back to what they should be as thesomeView
is inside the window defined in the AppDelegate and that is forced to.light
mode.So I guess that SwiftMessages creates a new window for
.window
and doesn't copy over theoverrideUserInterface
value.Now the question is whether this is a bug or not. Difficult to say, but it definitely is behavior one wouldn't neccessarily expect.