ITeye博客

iphone UIWebView 的使用

ynial · 2011-11-23 14:05 · iphone 开发 · 移动开发 · Markdown

【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;
 

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。