Multiple views in Xcode storyboard view controller, one of them won't appear in storyboard editor

Chris Hart picture Chris Hart · Nov 26, 2012 · Viewed 15.8k times · Source

I'm having trouble updating a project someone else created in Xcode. This is an app built in storyboard and in one case, there is a scene with a view controller that has multiple views underneath it in the document outline palette of the storyboard editor (shown in included image). The first view is the one that becomes highlighted in the storyboard editor when it is clicked on, and as you change the design or the objects in the view that view is updated. There is a second view (the one beneath exit and first responder) that is somehow attached to that scene but I cannot figure out how to edit the design of that view. If I click on that view or any of it's children, I can clearly see their attributes in the various inspectors on the right hand side (connections, attributes, etc.).

(edit 1 - the original version of this question suggested that these additional views were used for special layouts needed when switching to landscape. They are actually used more generally than that, for example, when displaying popups over the active view.)

In any event, my primary interest is in being able to modify this second view. It seems like there must be a way to see it in the editor and I'm just missing it. I've searched for tutorials on implementing portrait and landscape views in storyboards (none seem to use this method), for phrases like "multiple views in storyboard scene", and looked through the menu options (including a promising option "unembed" when the second view is selected, but when clicked it removes the view from the scene and then I can't find it). I'm at a loss of where to look to learn more. How can I edit this view? Any help is appreciated.

ViewController scene in document outline

Answer

jhilgert00 picture jhilgert00 · Dec 5, 2012

I know it makes no sense, but you can drag it into the first view (temporarily) to edit it via the storyboard. I think this is absurd, but it does work.

enter image description here