.h文件中
@property(strong ,nonitomic) UIWebView * webView;
.m文件中
-(void)viewDidLoad
{
self.webview = [[UIWebView alloc]initWithFormat:CGRectmake(0,0,320,480)];
[self.view addSubview:self.webView];
NSUrlRequeast * request = [NSURLRequest requestWithUrl:[NSURL urlWit"]];
//運行一下,百度頁面就出來了
[self.webview loadRequest:request];
}
更多信息請查看IT技術(shù)專欄