1.ios7後新特性要求App內訪問網絡請求,要採用 HTTPS 協議,針對http須要在info.plist中進行以下配置ios
UIWebView *webView=[[UIWebView alloc] initWithFrame:CGRectMake(0.0f,0.0f,self.view.bounds.size.width,self.view.bounds.size.height)]; [self.view addSubview:webView]; NSURL* url = [NSURL URLWithString:@"http://www.baidu.com"];//建立URL NSURLRequest* request = [NSURLRequest requestWithURL:url];//建立NSURLRequest [webView loadRequest:request];//加載