Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resize UINavigationController in a storyboard editor

When I want resize an UIViewController in a storyboard editor window I do:

  • I put size to "freeForm" in the UIViewController attributes inspector
  • I select the view and resize her with the size inspector

after that, the uiViewController is resized in storyboard window.

Next, I select the view controller, click on: edit > embeded in> Navigation Controller and the problem is that navigation controller is in full size and not the same size that UIViewController. I don't find how resize this navigation controller.

like image 617
Anthony Avatar asked Feb 08 '12 14:02

Anthony


1 Answers

There's a trick to get around this limitation. Add a view controller to your storyboard and then add a Container View as a subview to it's view. Size that container view to the size you want the navigation controller (and it's children) and then control drag from the container controller to your navigation controller. You can then instantiate the navigation controller by identifier and the container view controller will be ignored.

like image 74
Justin Driscoll Avatar answered Sep 24 '22 15:09

Justin Driscoll