Custom buttons in XIB used as Custom UITableViewCell don't respond to taps (ios7)

前端 未结 5 780
野性不改
野性不改 2021-02-05 11:28

So here I am upgrading a working ios6 app to ios7, and now I can\'t receive taps or other actions on custom buttons (or other subviews) inside my tableviewcells.

Edit:

5条回答
  •  暖寄归人
    2021-02-05 12:32

    It seems to be that when you use interface builder to customize a cell subclass all the views added are added below the contentView. This is why setting userInteractionEnabled = NO on the content view works, because touch events are allow to pass through.

    I used po [view recursiveDescription] with lldb to determine this.

提交回复
热议问题