-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Buggy when combining SW and TableView editing delegate methods #167
Comments
I second that. Adding that method resolves those issues. Notice that without this method, the output log spits messages about editing style already set to delete and other constraint issues. I assume since we implement our own delete method instead of the one implemented by UITableViewDelegate, this method (returning a style of none) should be required. |
I realize this issue is closed, but I am using 0.3.6 and am seeing something odd. If I set the table to I tried the above fix and it's not working. No swipe gestures are recognized (apparently) with editing enabled. |
@nod Have you found a solution for swipe gestures not being recognized? |
A solution: You can implement -respondsToSelector: method in your controller and return NO when is asking about @selector(tableView:commitEditingStyle:forRowAtIndexPath:). Anything like this:
|
@nod @karadza3a Have you found a solution to this? |
@buttcmd sorry, I actually no longer work on that app. I don't recall ever coming up with a good solution and ended up rewriting it to use a different lib. |
When I'm using just SWTableViewCell, everything works perfectly.
However, when combining it with native UITableViewCell delegate methods for editing functionality, such as tableView:commitEditingStyle:forRowAtIndexPath or tableView:canMoveRowAtIndexPath:, it gets glitchy sometimes.
I'm not doing anything out of the ordinary: tableView:cellForRowAtIndexPath: is setting rightUtilityButtons then the delegate, per the SW sample app. The tableView delegate methods are also pretty straight forward, they simply allow reordering, and deleting. I don't really care about deleting via the tableView delegate since I'm handling that in SW, but I need reordering and delete comes free with that when in edit mode.
It looks like adding this resolves the problem. It would be nice if this "fix" wasn't necessary.
{
return UITableViewCellEditingStyleNone;
}
Here's what I'm seeing happen:
https://www.dropbox.com/s/rw0m5469m2nelrb/SWTableViewCell.mov
The text was updated successfully, but these errors were encountered: