I've written some code that presents a UITableView with the following rss feed @"http://www.bristol.ac.uk/news/news-feed.rss".
I currently parse the file using NSXMLParser, successfully, and generate an NSDictionary containing the link for each feed.
However, how can I generate a View layout thet summarises the feed, similar to how mail does it with feeds (in following image) ? I like the 'read more' button too.
I assume I just pass an object from the dictionary over to a new view on the stack, once a feed is selected.
I currently parse the file using NSXMLParser, successfully, and generate an NSDictionary containing the link for each feed.
Code:
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{
//NSLog(@"ended element: %@", elementName);
if ([elementName isEqualToString:@"item"]) {
// save values to an item, then store that item into the array...
[item setObject:currentTitle forKey:@"title"];
[item setObject:currentLink forKey:@"link"];
[item setObject:currentSummary forKey:@"summary"];
[item setObject:currentDate forKey:@"date"];
[stories addObject:[item copy]];
NSLog(@"adding story: %@", currentTitle);
}
}
However, how can I generate a View layout thet summarises the feed, similar to how mail does it with feeds (in following image) ? I like the 'read more' button too.
I assume I just pass an object from the dictionary over to a new view on the stack, once a feed is selected.
