Open malcommac opened 11 years ago
Hi,
I don't think swipe-to-delete & paperfold can go well together. It's different to figure out user's intent, whether they want to delete or drag paperfold. When I use it myself, I just have to add an edit button. Unless you have a better solution?
Sent from my iPad
On 9 Nov, 2012, at 8:28 AM, Daniele Margutti notifications@github.com wrote:
Hi, I'm using PaperFold with a central UIView (an UIView with an UITableView inside) and a right UIView (an UIView with a Map). Everything is fine but there is an issue when I try to use swipe-to-delete inside a cell of the table. I suppose the event is handled by the PaperFoldView class and the event itself is never fired:
(UITableViewCellEditingStyle)tableView:(UITableView )tableView editingStyleForRowAtIndexPath:(NSIndexPath )indexPath; and consequently:
(void)tableView:(UITableView )tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath )indexPath; — Reply to this email directly or view it on GitHub.
The "problem" happends with the Pan gesture of PaperFoldView (init method):
panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(onContentViewPanned:)]; [_contentView addGestureRecognizer:panGestureRecognizer];
I've tried to pass the event to it's subviews but the result is not good. So I've added an util method to disable/enable pan gesture (when I need to edit the table I'm lucky because there is not any right/left fold view you can open).
Something like that:
It's a bit dirty but at this time I've not found a better solution.
when you need to edit the table, you can just disable panning for left and right folds. There are methods for that. Swipe still doesn't work when you disable them?
Are u talking about enableLeftFoldDragging,enableRightFoldDragging? I've tried to set both as NO but it does not work (pan gesture still active)
Hi, I'm using PaperFold with a central UIView (an UIView with an UITableView inside) and a right UIView (an UIView with a Map). Everything is fine but there is an issue when I try to use swipe-to-delete inside a cell of the table. I suppose the event is handled by the PaperFoldView class and the event itself is never fired:
and consequently: