私のコードではすべてが機能しますが、「swipeLeft.delegate = self;」によって常に警告が表示されます。
「自己」はこの警告によってマークされます。
警告: Passing 'UIWebView *' to parameter of incompatible type
と
「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....
}