In one of my apps I've implemented state restoration and am currently working on an iPad version. In the iPad version I'm using UIPopoverController
for displaying view controllers, but I'm unable to find out how those popover controllers should be saved and restored.
UIPopoverController
doesn't inherit from UIViewController
and hence doesn't have restorationIdentifier
and restorationClass
properties I could make use of.
Am I responsible for saving the popover controller's targetRect
and encoding it's contentViewController
manually in my main view controller so I can restore it during its -decodeRestorableStateWithCoder:
method or is there an easier way I just couldn't find in the documentation?
Fabain
Given that you have a property
popoverControllerRestorationDictionary
for storing additional information about the popover controller currently being presented, here is an idea of how you could restore popover controllers:This solution is suboptimal at best, so if anyone comes up with something better, please let me know!