daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "created_at" = "2012-09-21T12:41:26-0500"
  2.    
  3. NSArray *originalArray = @[
  4.     @{@"created_at" : [NSDate dateFromISO8601String:@"2012-09-21T12:41:26-0500"]},
  5.     @{@"created_at" : [NSDate dateFromISO8601String:@"2012-07-21T12:41:26-0500"]},
  6.     @{@"created_at" : [NSDate dateFromISO8601String:@"2012-06-21T12:41:26-0500"]},
  7.     @{@"created_at" : [NSDate dateFromISO8601String:@"2012-10-21T12:41:26-0500"]}
  8.     ];
  9.  
  10. NSSortDescriptor *sortDescriptor =
  11.     [[NSSortDescriptor alloc] initWithKey:@"created_at" ascending:NO];
  12. NSArray *sortedArray =
  13.     [originalArray sortedArrayUsingDescriptors:@[sortDescriptor]];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top