开发者

xcode iphone found cause of problem but don't know fix - ad the launching app store

I have this code in place:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigati开发者_开发知识库onType {
    if ( [request.mainDocumentURL.relativePath isEqualToString:@"/upload"] ) {
        viewController.view.hidden = NO;
        [viewController pushPick:nil];
        return NO;

    }
    return YES;
}

It is supposed to intercept a webview request when the location called is equal to "/upload", it works, however when other requests are made such as a URL to launch the app store it does not work. When I remove this code the admob ad launches the app store fine, but with this code it does not. Something with the "return YES" is not continuing the request to the app store launch. How can I fix this?


A UIWebView never opens the App Store on its own. You're probably overriding a different implementation of that delegate method that handles opening the App Store, so instead of returning YES, you should call the superclass.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜