Sets a clipping shape for this view.
- iOS 13.0+Beta
- macOS 10.15+Beta
- Mac Catalyst 13.0+Beta
- tvOS 13.0+Beta
- watchOS 6.0+Beta
- Xcode 11.0+Beta
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.