Hi
I have an NSMutableArray of objects, let's say 'Person' Objects. I want to sort the NSMutable Array by person.savings i.e if suppose person having savings 1000,1050,500,1200,2000,1050 i want the Array in the ascending order.
Thank You.
Hi
I have an NSMutableArray of objects, let's say 'Person' Objects. I want to sort the NSMutable Array by person.savings i.e if suppose person having savings 1000,1050,500,1200,2000,1050 i want the Array in the ascending order.
Thank You.
NSSortDescriptor *myDescriptor = [[NSSortDescriptor alloc] initWithKey:@"savings" ascending:YES];
[myArray sortUsingDescriptors:[NSArray arrayWithObject:myDescriptor]];