I want to sort the array with case insensitive,
This code sorts capital letters first n then small letters
Please suggest
This code sorts capital letters first n then small letters
Code:
listOfSItems =[[NSMutableArray alloc] initWithObjects:
[NSDictionary dictionaryWithObjectsAndKeys:@"Abhishek",@"firstName",@"9987544244",@"Phone",nil],
[NSDictionary dictionaryWithObjectsAndKeys:@"Rohit",@"firstName",@"Phone",nil],
.........
nil];
NSSortDescriptor *sort;
sort=[[[NSSortDescriptor alloc] initWithKey:@"firstName" ascending:YES]autorelease];
NSArray *sortedDesc = [NSArray arrayWithObject:sort];
[listOfSItems sortUsingDescriptors:sortedDesc];
Please suggest