I have a page with multiple popovers that I am trying to dismiss when another popover appears I am using the following code but it doesn’t seem to dismiss the popover
-(IBAction)OISButton:(id)sender{
if(![popoverController isPopoverVisible]){
OISView *oisView = [[OISView alloc] init];
UIPopoverController *pop = [[UIPopoverController alloc] initWithContentViewController:oisView];
[pop setDelegate:self];
[pop presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[pop setPopoverContentSize:CGSizeMake(320, 460)];
[oisView release];
}
else{
// close popover
[popoverController dismissPopoverAnimated:YES];
}
}
Any suggestions on how to modify this code? Thanks
Thanks Tom for putting me in the right direction, I have included the code below for one popover with a view called OISView in a format to handle multiple popovers: