Use an NSSortDescriptor like this.
NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
[stories sortUsingDescriptors:[NSArray arrayWithObjects:descriptor,nil]];
recent = [stories copy];
Stories is the array you want to sort .recent is another mutable array that has sorted dictionary values. Change the "name" to the key value that you want to sort.
All the best
source
share