您的位置:首页 > 移动开发

解决webView显示时候加广告问题

2016-05-18 14:52 295 查看
-(void)webViewDidStartLoad:(UIWebView *)webView{

    

    

    

    NSURL * hostUrl = [NSURL URLWithString:@"http://map.baidu.com"];

    NSArray *headeringCookie = [NSHTTPCookie cookiesWithResponseHeaderFields:@{@"Set-Cookie":@"Chdover=1"} forURL:hostUrl];

    [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookies:headeringCookie

                                                       forURL:hostUrl

                                              mainDocumentURL:nil];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息