UIWebView *webView = [[UIWebView alloc] init];
webView.scrollView.contentInset = UIEdgeInsetsMake(-20, 0, 0, 0);
webView.frame = self.view.bounds;
[self.view addSubview:webView];
webView.scalesPageToFit = YES;
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:currentURL]];
NSArray *cookies = [[ASUtils sharedInstance] getCurCookie];
NSDictionary *headers = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies];
[request setValue:[headers objectForKey:@"Cookie"] forHTTPHeaderField:@"Cookie"];
[webView loadRequest:request];
UIWebView + cookie
最新推荐文章于 2020-07-24 10:07:07 发布