一切都在我的代码中工作,但我总是警告"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)