我有一个UIWebview
我有SWIPE
RIGHT 和 LEFT 手势移动到下一页的地方UIwebview
。当webview
缩放时,我不想允许 SWIPE GESTURE。我已经在ViewdidLoad
.
webView = [[UIWebView alloc]initWithFrame:self.view.bounds];
webView.frame = CGRectMake(30, 106,966,500);
webView.scrollView.bounces = NO;
webView.scrollView.delegate = self;
webView.scalesPageToFit = YES;
[self.view addSubview:webView];
我还在 ViewdidLoad 中添加了 Gesture:
//Swipe Gesture for Webview
swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRightAction)];
swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeftAction)];
swipeRight.direction = UISwipeGestureRecognizerDirectionRight;
swipeRight.delegate = self;
[webView addGestureRecognizer:swipeRight];
swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
swipeLeft.delegate = self;
[webView addGestureRecognizer:swipeLeft];
缩放完成后,手势不应发生。我该如何解决这个问题?