xcode - UIWebView Swipe-Gesture -
xcode - UIWebView Swipe-Gesture -
everything works in code, warning "swipeleft.delegate = self;"
the "self" marked warning.
the warning : passing 'uiwebview *' parameter of incompatible type
and
passing 'viewcont *const __strong' parameter of incompatible type "id uigesturerecognizerdelegate
what can do??
my code:
#import "viewcont.h" @implementation viewcont @synthesize webview = webview_; - (void)viewdidload { //...code // add together left uiswipegesturerecognizer *swipeleft = [[uiswipegesturerecognizer alloc] initwithtarget:self action:@selector(swipeleftaction:)]; swipeleft.direction = uiswipegesturerecognizerdirectionleft; swipeleft.delegate = self; [webview_ addgesturerecognizer:swipeleft]; //code.... }
regarding line:
swipeleft.delegate = self;
your controller needs implement uigesturerecognizerdelegate follows:
@interface viewcont : uiviewcontroller<uigesturerecognizerdelegate> { } @end
i don't see problematic code regarding webview warning in provided code.
xcode uiwebview swipe-gesture uiswipegesturerecognizer
Comments
Post a Comment