Search code examples
iosxamarinuinavigationcontrolleruipopovercontroller

UIPopoverController in UINavigationController


I have a storyboard setup with the following hierarchy:

NavigationController > ViewController1 > Popover > ViewController2

However, when I move from the popover to ViewController2, I lose the back navigation and it is presented as a modal view. What I want is to be able to go back from ViewController2 to ViewController1. I have tried embedding the Popover in a NavigationController but then everything after appears in the popover. Can anyone help?


Solution

  • It should be ok if you pass a VC1 reference to your PopOver. Then if you want to move to VC2 you need to do this on the VC1 reference and call dismiss onto the PopOver.