Improved Three20 integration by leveraging object mapping to instantiate TTTableItems

This commit is contained in:
Blake Watters
2011-06-09 16:01:11 -04:00
parent 7bf3e0f273
commit 69ded29245
10 changed files with 205 additions and 139 deletions

View File

@@ -15,7 +15,7 @@
- (NSArray*)fetchRequestsForResourcePath:(NSString*)resourcePath {
if ([resourcePath isEqualToString:@"/topics"]) {
NSFetchRequest* request = [DBTopic fetchRequest];
NSSortDescriptor* sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"createdAt" ascending:YES];
NSSortDescriptor* sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"createdAt" ascending:YES] autorelease];
[request setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
return [NSArray arrayWithObject:request];
}