How can I sort an NSMutableArray alphabetically?

Ali picture Ali · Jan 18, 2011 · Viewed 40.9k times · Source

I want to sort an NSMutableArray alphabetically.

Answer

You can do this to sort NSMutableArray:

[yourArray sortUsingSelector:@selector(localizedCaseInsensitiveCompare:)];