简体   繁体   English

从UITableView调用UIPopoverController-Objective-C

[英]Calling UIPopoverController from UITableView - objective-c

Is it possible to call UIPopoverController from parentViewController's tableView? 是否可以从parentViewController的tableView调用UIPopoverController For example I've selected UITableViewCell: 例如,我选择了UITableViewCell:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{
     //Call UIPopoverController here
}

If yes, please give short example code 如果是,请提供简短的示例代码

What you wanna do is use a custom table view cell, and inside your cell, create a button. 您想要使用的是自定义表格视图单元格,然后在单元格内部创建一个按钮。 For the button, and define your popover from the button touch up inside event function. 对于按钮,并在事件功能内部通过按钮定义您的弹出窗口。 This method works and I use it in my current project. 此方法有效,我在当前项目中使用了它。

If you need, I can provide more details as it is not easy to describe the entire process in a few words. 如果需要,我可以提供更多详细信息,因为用几句话描述整个过程并不容易。

However, you might wanna check this out and see whether their solutions would help you. 但是,您可能想检查 ,看看他们的解决方案是否会帮助你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM