Open giofid opened 3 years ago
Not sure if it's an iOS bug or if the new modal style revealed the issue with SwiftMessages.
I need to look at the solution a bit. SwiftMessages determines the window scene in Presenter.swift
using the following logic:
@available (iOS 13.0, *)
private var windowScene: UIWindowScene? {
switch config.presentationContext {
case .windowScene(let scene, _): return scene
default: return UIApplication.shared.keyWindow?.windowScene
}
}
So it may be a bit different than what you proposed.
Hi @wtmoose, I'm experiencing a problem with statusBar style when I present a centered swiftMessage in a view controller presented with
.pageSheet
modalPresentationStyle
. I attach a screen below to better explain the problemI slightly modified the demo project to obtain it. I attach it too.
SwiftMessages-master.zip
Practically, the status bar is black on a black background. To solve the problem I have to pass
config.preferredStatusBarStyle = UIApplication.shared.delegate?.window??.windowScene?.statusBarManager?.statusBarStyle
during swiftmessage configuration.I'm wondering if it's better changing the
preferredStatusBarStyle
overriding implementation ofWindowViewController
to something likeI'd really like your opinion about this. Is this an iOS bug?