This page contains sample showing how to use the new NavigationLink without a SwiftUI List. While updating Farness for iOS 16, I found very few examples of using the new Navigation API without a List. In addition, List offers a selection binding that makes it pretty easy to set the selected object for the navigation. […]
Tag Archives: ui
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 […]