Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do you resize (visually, not programmatically) the detail view of a UISplitViewController in a storyboard?

In IOS5, with storyboards, suppose you have a UISplitViewController, which has some views that are set up as its master and detail views as normal. One of the detail views is set up as the initial detail view controller for the UISplitViewController, and thus its size, in the storyboard, is that of a normal detail view. Other detail views segue from this detail view, and because of the segue relationship, are also sized as normal detail views.

And, of course, they all dynamically resize when you change the device's orientation. So far so good.

Now suppose you add another UIViewController, which you are intending on using as the detail view for the UISplitView. In this case, however, you will be programmatically making it the detail view, instead of using a "replace" segue.

On the storyboard, this view will be full-sized, i.e. it will not look as though it is a detail view. This makes laying out the interface in the storyboard a problem.

In the attached screenshot, you can see that the view on the far right is a full-size view. I want to make it detail view sized in the storyboard. Far-right view should be detail view sized

How is this done? I've tried various combinations of sizes and options in the attributes inspector, but nothing seems to have much effect. The obvious choice would be "Size: Detail" in the "Simulated Metrics" section of the attributes inspector, but this appears to do nothing. Detail view sizing attribute seems to do nothing

like image 426
adriandz Avatar asked Jun 05 '12 17:06

adriandz


1 Answers

If I understand your question (resizing a viewController), I've done it through selecting Freeform in the Size box, then clicking on the view and setting its size through the Inspector.

fwiw - I haven't found a way to resize things like nav or tab controllers.

EDIT: After selecting "Freeform", click on the View, then set the size in the Identity Inspector tab as shown below (don't know tab name)

enter image description here

like image 182
spring Avatar answered Sep 23 '22 01:09

spring