Monday, June 11, 2012

How to sort a NSArray alphabetically?


How can I sort an array filled with [UIFont familyNames] into alphabetical order?



Source: Tips4all

1 comment:

  1. Take a look here:


    Apple Documentation


    The simplest approach is, to provide a sort selector (see the link for details):

    sortedArray = [anArray sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];

    ReplyDelete