Search code examples
iosswiftautolayoutnslayoutconstraintsize-classes

position a view horizontally center and vertically at bottom in storyboard


I have a container view that has child views in storyboard

I would like to position the container view horizontally center and vertically at bottom.

Thanks for any help


Solution

  • First make it center X to super view and bottom space 0 to bottom layout guide.It could like this: enter image description here

    Double click the bottom space and change the view bottom to center Y:

    enter image description here