Layers a secondary view in front of the view.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- Xcode 11.0+
The view to layer in front of the view.
The alignment for
overlayin relation to the view.
A view that layers
overlay in front of the view.
When you apply an overlay to a view, the original view continues to provide the layout characteristics for the resulting view. For example, the layout for the caption in this view fits within the width of the image: