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

前端 未结 7 1716
北恋
北恋 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:16

    I was faced with a similar issue:

    For me, the problem was because my UITableView was added to an UIScrollView and more specifically to its contentView. It appears that inside the contentView, I had to stay press 2-3 sec to fire the didSelectRowAtIndexPath method.

    I moved my TableView to self.view instead of contentView and it solved the problem!

提交回复
热议问题