Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not calling tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) #37

Closed
callo90 opened this issue May 5, 2017 · 10 comments
Assignees
Labels

Comments

@callo90
Copy link

callo90 commented May 5, 2017

Having multiple cells in a tableView is not calling
tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)

any ideas?

@jerkoch
Copy link
Contributor

jerkoch commented May 5, 2017

Hi @callo90 - I have not run into this. 🤔

Can you provide a simple project demonstrating the issue?

@callo90
Copy link
Author

callo90 commented May 5, 2017

Hey I found the issue, this is the scenario:

  1. I have two types of cell, first one extends from SwipeTableViewCell, the second one extends from UITableViewCell

  2. tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) not working.

  3. Now extending the second cell from SwipeTableViewCell

  4. tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) now working

I will check this in the code if you want, it shouldn't affect the behavior of the tableview.

@jerkoch
Copy link
Contributor

jerkoch commented May 7, 2017

Hey @callo90 - It works for me when I add the didSelectRowAt callback to the MailExample. Can you attach your code?

@AnasMostefaoui
Copy link

Hi guys
I had similar issue with didSelect, since I'm using GenericDataSource pod to manage my collections, adding didSelectRowAt was not an option.

my current work arround is to disable the tapGestureRecognizer.
What is the side effect of doing such thing ? I did try it and selecting actions is working

thanks

@jerkoch
Copy link
Contributor

jerkoch commented May 10, 2017

Hi @AnasMostefaoui - The tap gesture recognizer is used by the active cell to dismiss itself when tapping occurs in the content view area instead of the action buttons.

@HarithaNaveen
Copy link

Hi @callo90, Facing the same issue that you have mentioned. Having two different types of cells in a tableView. One extending SwipeTableViewCell, and another extending UITableViewCell, didSelectRow is not called. But when I tried extending the other cell also from SwipeTableViewCell, it worked.
Thanks.

@AaronBertsch
Copy link

Hi @callo90, had the same issues as well and extending all cells used in the table to SwipeTableViewCell worked.

@jerkoch A couple things I noticed that may help find the issue:
It seemed to only effect the first few rows, not sure it is was a percent thing or a specific number of rows, but if I scrolled the first item to the top so about half of the cell was showing, then the didSelectRowAt would fire while tapping on it.
Also, rows longer down the table view would also fire, it seemed to be about the first 6-7 rows that wouldn't unless they were scrolled up/down.

Thanks for the awesome cells btw :-)

@nebyark
Copy link

nebyark commented Jun 2, 2017

I'm seeing the same issue. The table view I'm working with has a few different custom table view cells (one of them being the SwipeTableViewCell). If the only cells visible on the screen were SwipeTableViewCells, then the didSelectRowAt method would fire without any problems-- otherwise, the delegate method would only fire intermittently on a long press.

Setting cancelsTouchesInView on the tapGestureRecognizer property in SwipeTableViewCell allowed the tap to pass through, which in turn fired the didSelectRowAt method (even when multiple custom cells were being displayed)-- but now I'm seeing issues where not all of my swipe action selectors are being fired.

@kurabi
Copy link
Member

kurabi commented Jun 3, 2017

Found the bug and have a fix, will commit fix tonight.

@kurabi kurabi added the bug label Jun 3, 2017
@kurabi kurabi self-assigned this Jun 3, 2017
@kurabi
Copy link
Member

kurabi commented Jun 17, 2017

Fixed in commit 73ff931

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants