mirror of https://github.com/xaoxuu/ProHUD
first window scene
This commit is contained in:
parent
7a0eaac1ae
commit
fd8cb906b7
|
@ -96,7 +96,7 @@ public extension Alert {
|
|||
window.resignKey()
|
||||
window.addSubview(view)
|
||||
if #available(iOS 13.0, *) {
|
||||
window.windowScene = cfg.windowScene ?? UIApplication.shared.windows.last?.windowScene
|
||||
window.windowScene = cfg.windowScene ?? UIApplication.shared.windows.first?.windowScene
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ public extension Toast {
|
|||
let window = UIWindow(frame: .zero)
|
||||
self.window = window
|
||||
if #available(iOS 13.0, *) {
|
||||
window.windowScene = cfg.windowScene ?? UIApplication.shared.windows.last?.windowScene
|
||||
window.windowScene = cfg.windowScene ?? UIApplication.shared.windows.first?.windowScene
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue