Reputation: 4803
To make application compatible with all sizes of devices, At some point we need to give width or height of UIControl
in proportion with main view that is our self.view
.
So we used to assign constraint in storyboard, equal height/width to main view and then we set multiplier. Like 0.3 So it will set height of my control (iPhone 5s --> 568 ==> 568*0.3 = 170.4) and so on for all devices.
But right now I am creating app in Xcode 11.0
. In that I cannot set equal height or width to main view.
- I have tried by selecting my view and right click and drag to superview, but there is no any option.
- Then I have tried with multiple selection. Select my view and superview and then tried to set constraint from bottom right corner, but no luck.
Upvotes: 3
Views: 2336
Reputation: 77540
Until this is fixed in an update (presumably):
Safe Area.Width
to Superview.Width
Although... you are probably better off leaving it at Safe Area
Upvotes: 4