Qeustion: Pretty much as stated in the title. I looked over the internet but cannot find anything that is easy to understand. I have NSArray
that contains many NSValue
. Those NSValue
each hold a CGPoint
. I want to sort them by x
then by y
second.
Some code :
NSValue * valuePointObject = [NSValue valueWithCGPoint:CGPointMake(x, y)];
NSArray *array = [[NSArray alloc] initWithObjects: valuePointObject, valuePointObject2, ..., nil];