如何在UIWebView中启用cookie

时间:2014-03-26 05:17:10

标签: ios cookies uiwebview nsurlconnection

我将一些值传递给服务器URL并在UIWebView中显示它。昨天它正常工作,但它显示启用cookie。我需要更改NSURL吗?

UIWebView *webview=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, 320,480)];
     NSURL *url=[NSURL URLWithString:[NSString stringWithFormat:@"http://server.net/projects/checkout/cart/add?product=%d",i]];
    NSURLRequest *nsrequest=[NSURLRequest requestWithURL:url];
    [webview loadRequest:nsrequest];
    [self.view addSubview:webview];

0 个答案:

没有答案