UIAspectRatioConstraint Maximum and Minimum values

UIAspectRatioConstraints are generally useful because they allow User Interfaces to look about the same on every device, no matter the scaling. However, this is also a curse due to it only being exactly one ratio, no matter what.

There are ways around this by putting frames inside of frames with the constraints, but that shouldn’t be the case

If Aspect Ratio Constraints had a maximum aspect ratio and a minimum aspect ratio, then it would be even more useful due to being able to still maneuver around and then locking to a constraint whenever it passes the constraint’s maximum value.

Basically, when between the max and the minimum, it would still scale around the screen’s size, but when it goes under the constraint, then it will strictly follow the minimum constraint, and when it goes over, then it will follow the maximum constraint.

When you want a regular solid constraint that doesn’t require a maximum/minimum, then it should be possible to just set it as a singular aspect ratio.

2 Likes