I am getting floor names and storing in _floorNames (NSMutableArray) by using
_floorNames=[conferenceHall floorDetails:office];
NSLog(@"floor names=%@",_floorNames);
This will print floor names like this.
GROUND,
THIRD,
FIRST,
SECOND
Now i want to sort that floor names NsMutableArray as
GROUND,
FIRST,
SECOND,
THIRD
I have used
NSSortDescriptor *aa=[[NSSortDescriptor alloc]initWithKey:floor ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)];
NSArray *descriptors = [NSArray arrayWithObjects:aa, nil];
a = [array sortedArrayUsingDescriptors:descriptors];
But it will crash my application. Any suggestions ...