Constrains this view’s dimensions to the aspect ratio of the given size.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- Xcode 11.0+
A size specifying the ratio of width to height to use for the resulting view.
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 uses
aspect as its own aspect ratio. In this example, the purple ellipse has a 3:4 width to height ratio, and scales to fill its frame: