didSelectRowAtIndexPath: not being called

前端 未结 14 2263
轻奢々
轻奢々 2020-11-29 18:57

I have a UITableView as a subview of my UIScrollVIew, which is the main view controlled by my MainViewController.

In MainView

14条回答
  •  庸人自扰
    2020-11-29 19:02

    I have found the answer. I had a UITapGestureRecognizer set for myTableView's superView. This overrode the selection call. Credit to whoever suggested that that might be it. Your answer was deleted before I could mark it correct.

    Set the cancelsTouchesInView property to NO on the gesture recogniser to allow the table view to intercept the event.

提交回复
热议问题