Is it possible to open another uipopovercontroller from the first popover UIButton click? If yes then how can i do it?
right now i am using the given code to open a popover from UIBarButtonItem
optionsViewController = [[OptionsViewController alloc] init];
popOverController = [[UIPopoverController alloc] initWithContentViewController:optionsViewController];
popOverController.popoverContentSize = CGSizeMake(250, 300);
[popOverController presentPopoverFromBarButtonItem:bbiOpenPopOver permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
You can open a second popover from any control in a popover; the mechanism is exactly the same as opening the first one. You need a reference to the content view controller, you create a new UIPopoverController using [[UIPopoverController alloc] initWithContentViewController:content];, you set whatever properties you want and then you present it.
To present it from a UIButton or other control that isn't a UIBarButtonItem use
[popoverController presentPopoverFromRect:[control bounds] inView:control permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
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