Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grandM

macrumors 68000
Original poster
Oct 14, 2013
1,551
309
So I have a popover with some content. Upon tapping a UIBarButtonItem I need the content of the popover to be replaced by the new ViewController. I tried applying show and show Detail but they are replacing the content of the view on which the popover is anchored?

I just want the popover view to be replaced by the view of the next VC.
 
If you have a Navigation controller inside the popover you can just push a new view controller.
Is there another way? Because I tried to embed in navigationController and got a crash stating it no longer new the identifier. Actually everything was embedded in a navigationController by the split view Controller (between the masterVC and the detailVC). I'm performing a popover on a pushed VC on the detailVC. But there seems to be a bug. Sometimes I even had to add navigationItems myself. Xcode seems to have forgotten the NavigationController.
 
If you have a Navigation controller inside the popover you can just push a new view controller.
I found the solution! In prepareForSegue I just have to call for:
Code:
destinationVC.modalPresentationStyle = UIModalPresentationStyle.CurrentContext
My sincere thanks for your help though.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.