Sets a clipping shape for this view.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
The clipping shape to use for this view. The
shapefills the view’s frame, while maintaining its aspect ratio.
The fill style to use when rasterizing
A view that clips this view to
style to define the shape’s rasterization.
By applying a clipping shape to a view, you preserve the parts of the view covered by the shape, while eliminating other parts of the view. The clipping shape itself isn’t visible.
For example, this code applies clipping shape to a square image:
The resulting view shows only the portion of the image that lies within the bounds of the circle.