Avatar
Kishikawa Katsumi 8/6/2018 6:32 AM
うろ覚えだけどhiddenをfalseにすると表示されるはず。手前に持ってくるのはwindowLevel. makeKeyAndVisibleを呼ぶ必要はなし(これは自信あり)
6:33 AM
func configureExternalDisplayAndShowWithContent(rootVC : UIViewController) { let screens = UIScreen.screens() // Configure the content only if a second screen is available. if screens.count > 1 { let externalScreen = screens[1] let screenBounds = externalScreen.bounds // Create and configure the window. self.externalWindow = UIWindow.init(frame: screenBounds) self.externalWindow!.windowLevel = UIWindowLevelNormal self.externalWindow!.screen = externalScreen // Install the root view controller self.externalWindow!.rootViewController = rootVC // Show the window, but do not make it key self.externalWindow!.hidden = false } else { // No external display available for configuration. } } UIWindowのドキュメントにこんな感じで書いてあったから、同じようにしたらいいのではないかしら。