WMPageController icon indicating copy to clipboard operation
WMPageController copied to clipboard

iOS11之后,tableview的左滑删除无法生效, 貌似是和WM代码有冲突了

Open soober opened this issue 6 years ago • 5 comments

soober avatar Jul 03 '18 03:07 soober

我也遇到此问题了,貌似不是无法生效,是手势冲突。

pengrun avatar Jul 10 '18 06:07 pengrun

请问这个问题你们解决了没?我也遇到这个问题了

MasterBetter avatar Jul 30 '18 06:07 MasterBetter

请问这个问题你们解决了没?我也遇到这个问题了

Snail67 avatar Sep 29 '18 09:09 Snail67

scrollEnable 设置为NO就行了、但是也就不能滑动切换controller了

shadow-boy avatar Dec 07 '18 03:12 shadow-boy

已解决 通过手势的location.y来做判断 亲测可行 我的tableView只有一个section 如果有多个需要做些调整

  • (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { //MARK: UITableViewCell 删除手势 if ([NSStringFromClass(otherGestureRecognizer.view.class) isEqualToString:@"UITableViewWrapperView"] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]) { return YES; } if ([otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [NSStringFromClass(otherGestureRecognizer.view.class) isEqualToString:@"UITableView"]) { UITableView *tableView = (UITableView *)otherGestureRecognizer.view; CGFloat y = [otherGestureRecognizer locationInView:tableView].y; NSInteger rowNum = [tableView numberOfRowsInSection:0]; if (rowNum > 0) { UITableViewCell *cell = [tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; if (cell) { CGFloat cellHeight = cell.height; if (y < cellHeight * rowNum) { return YES; } } } } return NO; }

eyuxin avatar May 24 '19 07:05 eyuxin