Please anyone help me to find out the Sort elements of array which contains the names of students like:
NSArray *studentsNames=@[@"bill", @"rob", @"ady",@"jhon", @"robert", @"prince"];
All sorting function present in NSArray
like following :
sortedArrayHint
sortedArrayUsingFunction:context
sortedArrayUsingFunction:context:hint
sortedArrayUsingDescriptors
sortedArrayUsingSelector
sortedArrayUsingComparator
sortedArrayWithOptions:usingComparator
Please give me proper examples or link for this.
You can sort NSArray in following manner
studentsNames = [anArray sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
Hope this will help you.