【问题标题】:Presenting a Popover From a Rect Problem从 Rect 问题中呈现弹出框
【发布时间】:2010-04-20 03:45:49
【问题描述】:

我有一个 UITableViewCell 有一些可以点击的标签和图像。每当用户单击单元格的任何部分时,我都想显示一个弹出框。如何在不干扰标签和图像的点击操作的情况下实现这一点?

我目前正在单元格中一些其他可点击项目的顶部创建一个不可见按钮并调用弹出框:

    [replyPopover presentPopoverFromRect:CGRectMake(77, 25, 408, 68) inView:self permittedArrowDirections: UIPopoverArrowDirectionDown animated:YES];

很遗憾,由于按钮位于标签和图像的顶部,我无法点击它们。

如何通过单击单元格的背景显示弹出框,以便在单击单元格内的图像和标签时不会受到干扰?

【问题讨论】:

    标签: objective-c iphone cocoa-touch ipad uipopovercontroller


    【解决方案1】:

    我需要在 tableview 委托方法中添加我的弹出框代码:

    - (void)tableView:(UITableView *)tblView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
    

    【讨论】:

      猜你喜欢
      • 2019-02-26
      • 1970-01-01
      • 2014-09-21
      • 2012-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-12
      相关资源
      最近更新 更多