Created
January 23, 2017 02:03
-
-
Save josephchang10/79c8fb1432eabb794636b2ef1a70698e to your computer and use it in GitHub Desktop.
Best way to sort an NSArray of NSDictionary objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSSortDescriptor * descriptor = [[NSSortDescriptor alloc] initWithKey:@"interest" ascending:YES]; | |
stories = [stories sortedArrayUsingDescriptors:@[descriptor]]; | |
recent = [stories copy]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment