.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]];
//運(yùn)行一下,百度頁(yè)面就出來(lái)了
[self.webview loadrequest:request];
}
更多信息請(qǐng)查看IT技術(shù)專欄