Layers the given view behind this view.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
The view to draw behind this view.
The alignment with a default value of
centerthat you use to position the background view.
background(_: when you need to place one vew behind another, with the background view optionally aligned with a specified edge of the frontmost view.
The example below creates two views: the
Frontmost view, and the
Diamond view. The
Frontmost view uses the
Diamond view for the background of the image element inside the