我有一个UIWebview
,其中我有SWIPE
右和左手势移动到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];
完成缩放后,GESTURE不应该发生。我该如何解决这个问题?