In an iOS 5 Storyboard, how do you push a new scene to the original view controller from a Popover?

You're expecting the UINavigationController hierarchy to extend itself into a presented popover. It won't. The same goes for presenting modal view controllers.

If you were to log self. NavigationController in popoverView you would see that it is nil.

Up vote 5 down vote favorite 3 share g+ share fb share tw.

I'm creating a popoverSegue from a new view controller and want to push a third view controller onto the original stack. This is how I'm creating the application: Create a new Single View Application Select Use Storyboards Select the MainStoryboard. Storyboard file.

Select the only View Controller, change the Title and Identifier to initialView, then select Editor->Embed In->Navigation Controller Drag two new View Controller objects from the Objects Library onto the canvas Change the Title and Identifier of the new View Controllers to: popoverView and newView. Add a Round Rect Button object from the Object Library to initialView and popoverView. Add a Label object from the Object Library to `newView.

Control click the button in the initialView and drag to popoverView. Select the Popover option from the Storyboard Segues menu that appears. Control click the button in the popoverView and drag to the newView.

Select the Push option fromt the Storyboard Segues menu. Build & Run. Click the first button, and the popover appears, but when you click the button within the popover, nothing happens (it should push the new view but doesn't.

) What I want to do is for it to push onto the Navigation Controller stack, but am not sure how to setup the storyboard for that. Any ideas? Ios xcode uipopovercontroller ios5 storyboard link|improve this question edited Oct 16 '11 at 20:50 asked Oct 16 '11 at 19:21lnafziger3,512315 57% accept rate.

You're expecting the UINavigationController hierarchy to extend itself into a presented popover. It won't. The same goes for presenting modal view controllers.

If you were to log self. NavigationController in popoverView, you would see that it is nil. Embed popoverView into it's own UINavigationController.

Remember that if you're overriding prepareForSegue:sender: and attempting to configure the popover, you will need to get the topViewController from destinationViewController as the destination is now an instance of UINavigationController.

Sounds like it should work, but if it doesn't try the following: 1. Click the segue that doesn't work and give it an identifier. Let's say it's PopoverToNewSegue.

In your implementation file for the popover view controller, add an action when the button is clicked. That function should return void and add the following line: self performSegueWithIdentifier:@"PopoverToNewSegue" sender:self; That should get your segue running. I've noticed that segues don't always work like you expect them to, but this one works for me without fail.

I'm having the same issue. I tried to call performSegueWithIdentifier like you said and it did nothing :( – jrwren Dec 20 '11 at 21:59.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions