我有一个普通的 UIPopoverController ,它是这样制作的:
-(IBAction)btKBIs_click:(id)sender
{
if(kbiPopOver != NULL)
[kbiPopOver dismissPopoverAnimated:YES];
KBIViewController *kbiViewController = [[KBIViewController alloc]initWithNibName:@"KBIViewController" bundle:nil CurrentUser:currentUser];
kbiViewController.currentStatus = FIRST;
kbiViewController.firstlist = [currentUser getDescriptions];
kbiViewController.mapViewController =self;
UINavigationController* kbiNavController = [[UINavigationController alloc] initWithRootViewController:kbiViewController];
kbiPopOver = [[UIPopoverController alloc] initWithContentViewController:kbiNavController];
kbiPopOver.delegate = self;
kbiViewController.kbiPopOver = kbiPopOver;
[kbiPopOver presentPopoverFromBarButtonItem:sender
permittedArrowDirections:UIPopoverArrowDirectionUp animated:true];
}
在我正在调用的类 KBIViewController 中:
[self.kbiPopOver dismissPopoverAnimated:YES];
[self.kbiPopOver.delegate popoverControllerDidDismissPopover:self.kbiPopOver];
解雇它,但它不起作用。为什么?