Posted By

rabc on 08/18/10


Tagged

iphone NSArray NSSortDescriptor


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

vamsiac
shimdh
umang_nine
bobbym245
rvachere
nsbuckner
Tintenklecks
cnathan


Sort an array of NSDictionary


 / Published in: Objective C
 

URL: http://stackoverflow.com/questions/3503141/nsdictionary-filtering-and-sorting/3503217#3503217

Snippet from a question I answered in StackOverflow.

  1. NSSortDescriptor *dateSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"issue_id" ascending:YES selector:@selector(compare:)] autorelease];
  2. [youDictionaryArray sortUsingDescriptors:[NSArray arrayWithObjects:dateSortDescriptor, nil]];

Report this snippet  

You need to login to post a comment.