One Quickie


Manually sorting results in a fetch request (Core Data->General)
I haven't figured out how to get the Xcode fetched query editor to sort. In the mean time, here's how to do it in code:
    NSSortDescriptor *sorter;
    sorter = [[NSSortDescriptor alloc]
                 initWithKey: @"when"
                 ascending: YES];

    [fetchRequest setSortDescriptors:
               [NSArray arrayWithObject: sortDescriptor]];



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com