`
ynial
  • 浏览: 225642 次
  • 来自: ...
社区版块
存档分类
最新评论

iphone UIWebView 的使用

 
阅读更多
【UIWebView 的使用】

1:引用外部连接

[super viewDidLoad];
    CGRect webFrame = CGRectMake(0.0, 0.0, 320.0, 460.0);
    UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];
    [webView setBackgroundColor:[UIColor whiteColor]];
    NSString *urlAddress = @"http://www.baidu.com";
    NSURL *url = [NSURL URLWithString:urlAddress];
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    [webView loadRequest:requestObj];
    self.view = webView;
 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics