我想从 UITableView 特定索引中呈现一个 UIPopover。这是我的代码:
if (indexPath.row == 5) {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
EnginesPopoverController *enginesPopoverController = [[EnginesPopoverController alloc] initWithNibName:@"EnginesPopoverController" bundle:nil];
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:enginesPopoverController];
self.popoverController = popover;
popoverController.delegate = self;
[popover release];
[enginesPopoverController release];
CGPoint point = {670, 600};
CGSize size = {450, 216};
[popoverController presentPopoverFromRect:CGRectMake(point.x, point.y, size.width, size.height) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
如果我尝试从 UIButton 呈现 Popover,它会顺利...
谢谢!