Anyone has ever come into the problem that UITableView
need long press to trigger the didSelectRowAtIndexPath
method?
UITableView manages the basic appearance of the table, but your app provides the cells ( UITableViewCell objects) that display the actual content. The standard cell configurations display a simple combination of text and images, but you can define custom cells that display any content you want.
To completely prevent selection of the UITableViewCell , have your UITableViewDelegate implement tableView:willSelectRowAtIndexPath: . From that method you can return nil if you do not want the row to be selected. This prevents the row from being selected and tableView:didSelectRowAtIndexPath: from being called.
If you have used any gesture recognizer try to removing it and check if it causing the problem or not ?
Other wise
Not sure but The problem might be in the UITableView
has delaysContentTouches
turned ON. Turn this OFF so touches get through to the cells faster.
In my situation I had a UITapGestureRecognizer on my view for hiding my keyboard.
This solved the problem:
tap.cancelsTouchesInView = false
I had exactly the same trouble :
My solution to select a cell in Table View by a short tap (press) :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With