[英]Swipe delete not working on TableVIewCell?
I have used REFrostedViewController side menu in my project . 我在我的项目中使用了REFrostedViewController侧面菜单。 it uses PanGesture which conflict the swipe gesture on
TableViewCell
i have also tried disabling its PangGusture using its property 它使用PanGesture与
TableViewCell
上的滑动手势冲突我也尝试使用其属性禁用其PangGusture
self.frostedViewController.panGestureEnabled=NO;
but still facing the same problem . 但仍面临同样的问题。
Where REFrostedViewController
extention of UIViewController
class 其中
REFrostedViewController
扩展了UIViewController
类
My question is 我的问题是
Is there anyway to disable the super class gesture ? 反正有没有禁用超类手势?
Most probably REFrostedViewController side menu intercepts and blocks the gestures. 最有可能的REFrostedViewController侧面菜单拦截并阻止手势。
Implement the following category in the view controller. 在视图控制器中实现以下类别。 It should solve the problem.
它应该解决问题。
@interface UIView (CellSwipeAdditions)
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;
@end
@implementation UIView (CellSwipeAdditions)
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.