标签:
UIWebView *_myWebView=[[UIWebView alloc]initWithFrame:self.view.frame];
NSURL * url =[[NSURL alloc]initWithString: @"http://www.newsbaidu.com"];
//基于NSURL对象来构建一个NSURLRequest对象
NSURLRequest * request = [NSURLRequest requestWithURL:url];
//通过调用 UIWebView的方法loadRequest发出请求
//请求完成就会回调webViewDidFinishLoad方法
[_myWebView loadRequest:request];
UIViewController *webVC=[[UIViewController alloc]init];
webVC.view=_myWebView;
// webVC.view.backgroundColor=[UIColor redColor];
[self.navigationController pushViewController:webVC animated:YES];
标签:
原文地址:http://www.cnblogs.com/shenshanyikuchai/p/4314811.html