I want to create a UIViewController
that should be separated in two equal (in both width and height) parts.
The top one should contain UIView
. The bottom one should contain the button centered both horizontally and vertically in this part:
I placed the UIView
object to the right place by setting its leading, trailing and vertical space to superview to 0
. I made it 0.5x screen's size by setting the equal heights
for this UIView
and its superview and gave it 2:1 multiplier where the first value related to the superview and the second value to the specified UIView
.
But how can I place the button at the center of the bottom half of the screen?
I'm using auto-layouts and size classes.