Supporting External Displays

The WWDC 2018 video Adding Delight to your iOS App shows how to support external displays. Test to see if there is more than one screen available. UIScreen.screens.count > 1 Observe screen connect or disconnect notifications. let notificationCenter = NotificationCenter.default notificationCenter.addObserver(self, selector: #selector(connectScreenHandler), name: UIScreen.didConnectNotification, object: nil) notificationCenter.addObserver(self, selector: #selector(disconnectScreenHandler), name: UIScreen.didDisconnectNotification, object: nil) Add […]