UITableViewCell中的按钮在ios 7下无响应 [英] Button in UITableViewCell not responding under ios 7

查看:94
本文介绍了UITableViewCell中的按钮在ios 7下无响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个tableview,每个单元格包含一个按钮。它在所有iOS版本中运行良好,但是7.我不知道发生了什么。单元格是在一个xib文件中构建的。

I have one tableview and each cell contains one button. It's working pretty well all iOS versions but 7. I don't know what's going on. The cell is constructed in one xib file.

有人能给我一些建议吗?在此先感谢。

Could anyone give me some suggestions? Thanks in advance.

推荐答案

对我有用的是:

contentView.userInteractionEnabled = NO;

从nib加载我的自定义单元格后调用

。看起来这个内容视图是在创建nib文件中定义的视图后创建并设置为顶级子视图的。

called after loading my custom cell from nib. It looks like this content view is created and set as a top-level child view after creating views defined in the nib file.

这篇关于UITableViewCell中的按钮在ios 7下无响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆