Constrains this view’s dimensions to the specified aspect ratio.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
The ratio of width to height to use for the resulting view. If
nil, the resulting view maintains this view’s aspect ratio.
A flag indicating whether this view should fit or fill the parent context.
A view that constrains this view’s dimensions to
content as its scaling algorithm.
If this view is resizable, the resulting view will have
aspect as its aspect ratio. In this example, the purple ellipse has a 3:4 width to height ratio, and scales to fit its frame: