【问题标题】:iOS UIWebView load xml [closed]iOS UIWebView 加载 xml [关闭]
【发布时间】:2012-10-10 06:06:22
【问题描述】:

我有一个 XML 地址 (http://itunes.apple.com/us/rss/customerreviews/id=350962117/sortBy=mostRecent/xml) 的 App Store 评论页面。我想将它们放在 iPhone 上以作为提要显示。

NSString *urlAddress = @"http://itunes.apple.com/us/rss/customerreviews/id=350962117/sortBy=mostRecent/xml";

但是 webView 不显示这个页面。

【问题讨论】:

    标签: iphone ios ipad uiwebview


    【解决方案1】:

    必须在您的 nib 中添加 webView 并连接 webView *delegate* 方法 文件名WebViewController.*m*

    - (void)viewDidLoad 
    
    {
    
    NSString *urlAddress = @”http://www.google.com”;
    
    
    NSURL *url = [NSURL URLWithString:urlAddress];
    
    
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    
    //Load the request in the UIWebView.
    [webView loadRequest:requestObj];
    
    }
    

    希望对您有所帮助...

    【讨论】:

    • 谢谢你帮我解决问题
    猜你喜欢
    • 1970-01-01
    • 2014-10-22
    • 1970-01-01
    • 2013-03-14
    • 2014-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-19
    相关资源
    最近更新 更多