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.
201elements
ContentUnavailableView
Content Unavailable
A placeholder for empty results with optional button
Explore Content Unavailable on iPhone in portrait, with SwiftUI code and Apple API documentation.
SwiftUI code
ContentUnavailableView {
Label("No Mail", systemImage: "tray.fill")
} description: {
Text("New mails you receive will appear here.")
} actions: {
Button("Switch Account") { }
.buttonStyle(.borderedProminent)
}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 Content Unavailable.