Please note, this blog entry is from a previous course. You might want to check out the current one.
Sort all tables alphabetically (and case insensitively) except the Recents table (which should still be sorted with the most recently viewed first). A good solution to this might involve some of the array sorting methods that use blocks.
… actually the code up to this task already does sorting, but now it will be implemented using blocks.
For the tags create a new property – to do not have to resort everything every time the table needs to display a row:
@property (nonatomic, strong) NSArray *tags; ... - (void)updatePhotosByTag { ... self.tags = [[photosByTag allKeys] sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { return [obj1 compare:obj2 options:NSCaseInsensitiveSearch]; }]; }
Continue reading “cs193p – Assignment #5 Task #6”