Button in UITableViewCell not responding under ios 7

前端 未结 23 1729
刺人心
刺人心 2020-11-30 01:16

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

23条回答
  •  执念已碎
    2020-11-30 01:39

    I experienced the same issue. It turns out I had created a UIView object in IB and then set it's class to a subclass of UITableViewCell.

    Since the object I originally created in IB was a UIView, the UITableViewCell contentView didn't get added until runtime, which happened to be on top of my UIButtons making them un-selectable.

提交回复
热议问题