开发者

How can I present an UIPopoverController from an UITableViewCell?

开发者 https://www.devze.com 2023-01-09 00:09 出处:网络
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.row == 5)
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row == 5)
    {
        [tableView deselectRowAtIndexPath:indexPath animated:YES];
        [enginesPopoverController presentPopoverFromRec开发者_高级运维t:[tableView bounds] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
    }
}


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

Good Luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消