UIAspectRatioConstraint ignores UISizeConstraint

Aspect ratio has been constantly ignoring the size constraint for as long as I can remember and I am now wanting to use both in a project; so I would like some clarification on whether it’s a bug or not and if I need to move this to feature requests.

System details:
Windows 10
Latest studio update

image

2 Likes

This is definitely a bug on your end, and not a feature request.

Having tried and tested it myself you can definitely have both.

Example shown below:

28

As shown in the last photo it follows the UIAspectRatioConstraint but I am unable to resize it any further, as I made the smallest size possible 200x200, and for the avoidance of any doubt have added a GIF below:

https://gyazo.com/38d7bce1d42a1b1d28c544f375beeb82

1 Like

Wow, thanks. Can’t believe I waited this long to submit a request, will put more details of my system in the bug report.

2 Likes

Seems like it doesn’t work when aspect ratio is set to “scale with parent size”.

Apologies for bumping - it seems like I may be experiencing a similar bug, thinking it was a problem on my part as I said in this thread opened for help:

Anyone can confirm if this is legit a bug?