0

iOS6 XCode 4.5.2

I have a MainViewController which has 5 UIButtons on the left (B1 - B5). In the middle of the Main View Controller, I have a ContainerView. This ContainerView has 5 scenes (the initial scene is also a navigation controller) that I would like to wire up to the 5 UIButtons. When buttons are pressed, I'd like the scenes to open to up inside the container.

Currently when the app runs, I can click the Next button on the initial ContainerView Scene and step through all 5 scenes. I can even come back to the first scene by pressing the Back button step-by-step. However, after wiring up the UIButtons, through the Storyboard, when I click on any the buttons, instead of opening up the scene inside the container, they open up in Full Screen, stacking on top of the MainViewContoller.

When a button is pressed, how can I get the scenes (Scene 1, Scene 2, etc.) to open up inside the container?

enter image description here

user1107173
  • 10,334
  • 16
  • 72
  • 117

1 Answers1

0

Are you programming for the iPhone? The iOS Human Interface Guidelines specify that "on iPhone, a navigation bar always displays across the full width of the screen.". In this case, I suggest you get rid of the second navigation controller.

neural5torm
  • 773
  • 1
  • 9
  • 21
  • Yes, it is for an iPhone. good point! Thank you! Ill have to use buttons to go back and forth instead? Will apply reject it if I submit it in its current state? Any recommandation on how to get the views to work like the navigation controller? – user1107173 Mar 04 '13 at 19:16
  • @user1107173 Apple will generally reject an app that doesn't adhere to their guidelines. What I was trying to say is that you should use only one level of navigation at all times on the iPhone. Maybe you could remove your top-level navigation controller, factor your buttons out into a tab bar controller in which you could then nest your current second-level navigation controller? Like in the [HIG, figure 1-4](https://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/AboutViewControllers/AboutViewControllers.html#//apple_ref/doc/uid/TP40007457-CH112-SW10). – neural5torm Mar 05 '13 at 14:38
  • @user1107173 did I answer your question btw? – neural5torm Sep 15 '13 at 17:28