Please note, this blog entry is from a previous course. You might want to check out the current one.
Divide all tables of photos (except maybe the “All” table below) into alphabetical sections. This turns out to be easy in table views driven by Core Data, but only if you have an attribute in the database which is “that photo’s section heading” and which sorts in exactly the same order as the photos themselves sort.
Add another attribute to the Photo entity to hold the first letter of each photo title. Recreate its sub class and adjust its category:
+ (Photo *)photoWithFlickrInfo:(NSDictionary *)photoDictionary inManagedObjectContext:(NSManagedObjectContext *)context { ... photo.firstLetter = [photo.title substringToIndex:1]; ... }
Continue reading “cs193p – Assignment #6 Extra Task #1”