From 0a0e93f37e0feac7e14e11b8a78adb8f43cc8a41 Mon Sep 17 00:00:00 2001 From: songwentong Date: Wed, 25 Dec 2019 14:01:10 +0800 Subject: [PATCH] appendNewWindow --- Sources/WTKit/UIKit.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/WTKit/UIKit.swift b/Sources/WTKit/UIKit.swift index 29fae44..6ff8da6 100644 --- a/Sources/WTKit/UIKit.swift +++ b/Sources/WTKit/UIKit.swift @@ -433,7 +433,7 @@ public extension UITabBarController{ public extension UIApplication{ @available(iOS 13.0, *) - static func appendNewWindow() -> UIWindow? { + static func appendNewWindow() -> T? { let sceneList = UIApplication.shared.connectedScenes.compactMap { (s:UIScene) -> UIWindowScene? in if let s2 = s as? UIWindowScene{ return s2 @@ -443,7 +443,7 @@ public extension UIApplication{ guard let first = sceneList.first else{ return nil } - let win = UIWindow.init(windowScene: first) + let win = T.init(windowScene: first) win.windowLevel = UIWindow.Level.statusBar + 1 win.backgroundColor = UIColor.clear win.frame = UIScreen.mainScreenBounds