Reputation: 4961
What constraints I should add to set width and height proportional to the Superview (in my case its the UIViewController's view) in iOS Autolayout, with Autoresizing we can do like the pic shown below.
Upvotes: 3
Views: 2456
Reputation: 148
if a uiview in a uiviewcontroller.
you must add centre horizontally and vertically in container constraint for that uiview.
you need to add equal height and equal width constraint for that uiview with your super view.
Upvotes: 4