我有一个
NSDictionary* dict = [[NSDictionary alloc]initWithObjectsAndKeys::arrayOne,@"Plants",arrayTwo,@"Animals"),arrayThree,@"Birds",nil];`
self.displayArray =[[dict allKeys] sortedArrayUsingSelector:@selector(compare:)];
一切正常,我都能在桌子上看到所有关键价值/价值,但是它们是按照分类顺序排列的,如动物、鸟、普朗茨。
但我想以植物、动物、鸟等形式展示
Can anyone tell me how to sort the array in my customized order? I have googled and found that we can use NSSortDescriptor for sorting. But I am not very clear with that. Can anyone help me ?