I'm working on a project that parses an rss feed for each article's title, description and link. I need to then append the link with a string @"?f=m" I'm having trouble figuring out where to start. I'm new to IOS programming. I think the file I need to manipulate is here:
-(void)viewDidAppear:(BOOL)animated
{
RSSItem* item = (RSSItem*)self.detailItem;
self.title = item.title;
webView.delegate = self;
NSURLRequest* articleRequest = [NSURLRequest requestWithURL: item.link];
webView.backgroundColor = [UIColor clearColor];
[webView loadRequest: articleRequest];
}
But it could also be here:
-(void)fetchRssWithURL:(NSURL*)url complete:(RSSLoaderCompleteBlock)c
{
dispatch_async(kBgQueue, ^{
//work in the background
RXMLElement *rss = [RXMLElement elementFromURL: url];
RXMLElement* title = [[rss child:@"channel"] child:@"title"];
NSArray* items = [[rss child:@"channel"] children:@"item"];
NSMutableArray* result = [NSMutableArray arrayWithCapacity:items.count];
//more code
for (RXMLElement *e in items) {
//iterate over the articles
RSSItem* item = [[RSSItem alloc] init];
item.title = [[e child:@"title"] text];
item.description = [[e child:@"description"] text];
item.link = [NSURL URLWithString: [[e child:@"link" ] text ]] ;
[result addObject: item];
}
c([title text], result);
});
}
Any help is sincerely appreciated.