Skip to content

Instantly share code, notes, and snippets.

@bhoomesh
Created April 2, 2012 14:55
Show Gist options
  • Save bhoomesh/2284120 to your computer and use it in GitHub Desktop.
Save bhoomesh/2284120 to your computer and use it in GitHub Desktop.
Sort Array with list of strings
NSMutableArray *strings = [[NSMutableArray alloc]init];
[string addObject:@"string1"];
[string addObject:@"string2"];
[string addObject:@"string3"];
[string addObject:@"string4"];
NSArray *sortedStrings = [strings sortedArrayUsingSelector:@selector(compare:)];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment