【发布时间】:2012-02-03 20:33:00
【问题描述】:
我有一个 NSArray,我想按字母顺序排序,我目前正在使用 sortedArrayUsingSelector:@selector (localizedCaseInsensitiveCompare:)。这返回
CAA
CBL
CCC
Cab
Car
Cat
首字母缩略词按字母顺序排列,然后是其他缩写词。我将使用什么来排序,以便首字母缩写词与常规单词一起排序?在 Apple 的文档中似乎找不到答案。
book = [[self.sections valueForKey:[[[self.sections allKeys] sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)] objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row];
【问题讨论】:
标签: objective-c ios cocoa-touch nsarray