小编use*_*380的帖子

UIWebView Swipe-Gesture

一切都在我的代码中工作,但我总是警告"swipeLeft.delegate = self;"

这个警告标志着"自我".

警告是:将'UIWebView*'传递给不兼容类型的参数

将'viewCont*const __strong'传递给不兼容类型的参数"id UIGestureRecognizerDelegate

我能做什么??

我的代码:

#import "viewCont.h"

@implementation viewCont

@synthesize webView = webView_;

- (void)viewDidLoad
{
//...code

// add Left 
    UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeftAction:)];
    swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
    swipeLeft.delegate =  self;
    [webView_ addGestureRecognizer:swipeLeft];

//code....
}
Run Code Online (Sandbox Code Playgroud)

xcode uiwebview uiswipegesturerecognizer swipe-gesture

1
推荐指数
1
解决办法
2389
查看次数