簡體   English   中英

沒有在xcode 4 iPhone應用程序中顯示rss feed?

[英]Not showing rss feed in xcode 4 iPhone app?

難道我做錯了什么? 我認為這可能是模擬器,但我不確定。 我在標簽欄應用中創建了一個RSS閱讀器。 當我使用rss提要時,它說無法在無法獲取提要的UIAlertView中獲取rss提要。 它是提要類型嗎? 我不確定。 這是代碼:

-(BOOL)fetchAndParseRss{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;

    //To suppress the leak in NSXMLParser
    [[NSURLCache sharedURLCache] setMemoryCapacity:0];
    [[NSURLCache sharedURLCache] setDiskCapacity:0];

    NSURL *url = [NSURL URLWithString:@"feed:https://www.google.com/calendar/feeds/fcfihq@aol.com/public/basic?orderby=starttime"];
    BOOL success = NO;
    NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url];
    [parser setDelegate:self];
    [parser setShouldProcessNamespaces:YES];
    [parser setShouldReportNamespacePrefixes:YES];
    [parser setShouldResolveExternalEntities:NO];
    success = [parser parse];
    [parser release];
    [pool drain];
    return success;
}

還有一個警告:“類'BlogRssParser'未實現'NSXMLParserDelegate'協議”

嘗試刪除“提要:”

NSURL *url = [NSURL URLWithString:@"https://www.google.com/calendar/feeds/fcfihq@aol.com/public/basic?orderby=starttime"];

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM