Button in UITableViewCell not responding under ios 7(UITableViewCell中的按钮在ios 7下没有响应)
问题描述
我有一个表格视图,每个单元格包含一个按钮.除了 7 之外,所有 iOS 版本都运行良好.我不知道发生了什么.该单元格在一个 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下没有响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!