My app is a ios phonegap application . I want to disable the copy and paste menu from the textfields on the web view. On long press and on double clicks , the copy paste menu shows up.I tried to disable long press and double clicks with UIGestureRecognizer class :
- (void)viewDidLoad{
UILongPressGestureRecognizer* longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(gestureHandler:)];
[longPressGesture setMinimumPressDuration:0.2];
longPressGesture.delegate = self;
[self.webView addGestureRecognizer:longPressGesture];
}
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
if ([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) {
return NO;
}
else if([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]]){
return NO;
}
else
return YES;
}
But am not able to disable it for double clicks.Anyone with the same query? Help me out...