Sorting NSArray
Im having a hard time understanding how sorting of arrays are working in ObjC.
I have a simple class (Person) that have a couple of properties such as name, phoneNumber, address etc.
Then I have a array of Person's in a NSArray.
How can I easily sort the array based on names in the Person class ?
This is how I would do it in C#
Array.Sort(_myPersonArray, delegate(Result x, Result y)
{
return x.Name.CompareTo(y.Name);
});
|