如何从UITableViewCell呈现UIPopoverController?

时间:2010-07-28 11:54:59

标签: ipad uipopovercontroller

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row == 5)
    {
        [tableView deselectRowAtIndexPath:indexPath animated:YES];
        [enginesPopoverController presentPopoverFromRect:[tableView bounds] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
    }
}

1 个答案:

答案 0 :(得分:14)

[popoverController presentPopoverFromRect:[tableView rectForRowAtIndexPath:indexPath] inView:[self view] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

祝你好运!