0
添加UISwipeGestureRecognizer
UIWebview *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0,0,320,self.view.frame.size.height)];
webView.delegate=self;
[webView.scrollView setScrollEnabled:YES];
webView.backgroundColor=[UIColor grayColor];
[view1 addSubview:webView];
UISwipeGestureRecognizer * Swiperight=[[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swiperight11:)];
Swiperight.delegate=self;
[Swiperight setNumberOfTouchesRequired:1];
Swiperight.direction=UISwipeGestureRecognizerDirectionRight;
[webView addGestureRecognizer:Swiperight];
這個向右掃不行的,但是當我們使用這個
[webView addGestureRecognizer:Swiperight]; insted of
[view1 addGestureRecognizer:Swiperight];
那麼它做工精細,所以,我要問的是UISwipeGestureRecognizer不適用於Webview? 幫我