NSMutableArray:sortUsingSelector: method takes selector for a compare function as its argment. See following code.
NSMutableArray *a = [NSMutableArray arrayWithObjects:@"Cat", @"Dog", @"Fish", @"Squirrel", @"Bear", @"Turtle", nil]; [a sortUsingSelector:@selector(compare:)];