Search code examples
iosuipopovercontroller

Perform segue from inside a popover


I want to replace the contents of a popover without dismissing the popover

my probelm is, if i use UINavigationViewController as the root of the popover inner view controller, the next view controller that I display, takes up the whole size of the screen minus the margins i gave it.

I want the next contents in the popover to be the same size as the original

How can I do that?


Solution

  • Try setting self.contentSizeForViewInPopover = sizeOfThePopover; for the view controller you want to add to popover. Or you can use self.preferredContentSize = sizeOfThePopover; available from iOS7