Constrains this view’s dimensions to the specified aspect ratio.
- 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 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: