Sort iPhone TableView From RSS Alphabetically

nonex

New Member
I am trying to change my podcast view from sorting via pubDate to sorting alphabetically. The code used in parsing the RSS currently for dates is:\[code\] NSMutableArray *entries = [NSMutableArray array]; [self parseFeed:doc.rootElement entries:entries]; [[NSOperationQueue mainQueue] addOperationWithBlock:^{ for (RSSEntryDirectory *entry in entries) { int insertIdx = [_allEntries indexForInsertingObject:entry sortedUsingBlock:^(id a, id b) { RSSEntryDirectory *entry1 = (RSSEntry *) a; RSSEntryDirectory *entry2 = (RSSEntry *) b; return [entry1.articleDate compare:entry2.articleDate]; }]; [_allEntries insertObject:entry atIndex:insertIdx]; [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:insertIdx inSection:0]] withRowAnimation:UITableViewRowAnimationRight]; } }];\[/code\]How can I change this to just do alphabetically by one of the other entry properties?
 
Back
Top