Reputation: 611
I have a view inside another view which I create using storyboard, now I want to position my inner view center vertically. How can I achieve that?
Upvotes: 1
Views: 6067
Reputation: 3690
First select the View and place in center of the nib,Then Tick the Horizontal Center in Container and Vertical Center in Container
Then Give Height and Width to the View,Your View is now centered.
Upvotes: 10
Reputation: 7582
Use NSLayoutConstraint (Center Horizontally, Center Vertically) with parent view. And you need set constraint (width, height) for this view.
Upvotes: 0