iPhone SwiftUI layouts
Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.
203elements
Navigation
Preferred Top Column
Controls which column appears on top of the stack when NavigationSplitView collapses into a single stack in certain contexts, such as on iPhone, when iPhone Duo is closed, or on Apple Watch. By default, the sidebar appears on top. In this case, the detail column does instead.
Explore Preferred Top Column on iPhone in portrait and landscape, with SwiftUI code and Apple API documentation.
SwiftUI code
NavigationSplitView(preferredCompactColumn: .constant(.detail)) {
Color.blue
} content: {
Color.indigo
} detail: {
Color.orange
}Compatibility
iOS 17.0+ iPadOS 17.0+ macOS 14.0+ watchOS 10.0+ tvOS 17.0+ visionOS 1.0+
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone screenshot for Preferred Top Column.