【问题标题】:Custom UITableViewCell doesn't respond on textLabel touches自定义 UITableViewCell 不响应 textLabel 触摸
【发布时间】:2012-06-08 18:49:26
【问题描述】:

我有自定义UITableViewCell。它包含UITextLabel。 当我将此单元格按在标签上时,它没有响应,但如果我在空白区域触摸它,则会响应。可能是什么问题?

我的单元格是在 IB 中制作的,已启用用户交互。另外,我注意到这个问题只发生在 iPad 上,在 iPhone 上一切正常!

【问题讨论】:

    标签: objective-c xcode cocoa-touch ipad


    【解决方案1】:

    转到 CustomCell 的 IB 并禁用标签的用户交互。

    【讨论】:

      【解决方案2】:

      检查您的 textLabel 的框架。如果你的 textLabel 的框架超出了你的 UITableViewCell,它不会响应触摸事件。

      【讨论】:

        【解决方案3】:

        问题在于UITableView之上还有另一个视图

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2018-09-15
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-05-23
          • 1970-01-01
          相关资源
          最近更新 更多