From f931523522467394fe5d3f1dffd9e05f9f49a0a2 Mon Sep 17 00:00:00 2001 From: Cong Nguyen Date: Tue, 3 Aug 2021 19:32:33 +0900 Subject: [PATCH] Support scene enabled applications --- TouchPrinter/TouchPrinter.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TouchPrinter/TouchPrinter.swift b/TouchPrinter/TouchPrinter.swift index fe0969c..c4bbac3 100644 --- a/TouchPrinter/TouchPrinter.swift +++ b/TouchPrinter/TouchPrinter.swift @@ -44,6 +44,9 @@ extension UIWindow { dotWindow.rootViewController = UIViewController() dotWindow.frame = UIScreen.main.bounds dotWindow.isHidden = false + if #available(iOS 13.0, *) { + dotWindow.windowScene = UIApplication.shared.keyWindow?.windowScene + } dotWindow.backgroundColor = .clear dotWindow.addSubview(dot)