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
AsyncImage
Custom Placeholder Async URL Image
Loads and displays a modifiable image from the specified URL load request using a custom placeholder until the image loads.
Explore Custom Placeholder Async URL Image on iPhone in portrait, with SwiftUI code and Apple API documentation.
SwiftUI code
VStack {
AsyncImage(request: URLRequest(url: slowURL)) { image in
image.resizable(resizingMode: .tile)
.resizable()
.scaledToFit()
} placeholder: {
ProgressView()
}
AsyncImage(request: URLRequest(url: imageURL)) { image in
image.resizable(resizingMode: .tile)
.resizable()
.scaledToFit()
} placeholder: {
ProgressView()
}
.frame(height: 100)
}Compatibility
iOS 27.0+ iPadOS 27.0+ macOS 27.0+ watchOS 27.0+ tvOS 27.0+ visionOS 27.0+
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone screenshot for Custom Placeholder Async URL Image.