iphone - didSelectRowAtIndexPath: only being called after long press on custom cell

前端 未结 7 1714
北恋
北恋 2020-12-09 08:07

I am creating one table view based application. I have created a custom table cell for table, that contains 2 labels, 1 image and 1 button. The table view Data source metho

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-09 08:14

    same problem happened with me because I have added a tap gesture recogniser over it. If you have used any gesture recognizer try removing it and check if it causing the problem.

    EDIT: Solution as commented by the Ali: If you have used tap gesture you can use [tap setCancelsTouchesInView:NO];

提交回复
热议问题