My program has four PopOverControllers. How can I make sure that when i open one of them the other three are closed?
A:
2 possible methods.
Create a controller style object 'parent' for the 4 popoverControllers that knows about the four POC's and can drop the other 3 when the 4th comes up in a radio-button style algorithm.
or a variant.
Spit out a notification when you raise a popover so a listener can again drop the other 3.
But a query, why do you have 4 popoverControllers. Id recycle one per viewController.
Warren Burton
2010-09-04 10:49:41
If I use only 1 PopOverController then I can't keep the state of the controls in those views eg. an UISwitch in one of the views
Fasid
2010-09-04 22:14:58
That's got nothing to do with the POC ,your view isn't your data. If you need to persist you can set state in 'viewDidAppear' for the relevant view controller
Warren Burton
2010-09-05 09:03:22
A:
If you make the detail side the delegate for the UISplitViewController
, you can keep track of the most-recently showed UIPopoverController
and dismiss it before a new one gets shown when splitViewController:popoverController:willPresentViewController:
is called.
Shaggy Frog
2010-09-04 20:39:56