I use UIPopoverController to popover a window. I use preferredContentSize to set the size. Then, I use Push a new view controller with larger size. When the child view pop up, I like to recover the window to original size. But seems not work.
I already put the self.preferredContentSize = myWindowSize; But it seems can not recover.
In iOS6 or before, I set the contentSizeForViewInPopover to CGSizeZero, then set the proper size. But on iOS7, it will make the popup disappear.
This solved it for me:
override func viewDidAppear(animated: Bool)
{
navigationController?.preferredContentSize = preferredContentSize
super.viewDidAppear(animated)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With