【发布时间】:2015-03-09 18:59:46
【问题描述】:
uniqueOrganizationsArray 属于 [String] 类型。
private let collation = UILocalizedIndexedCollation.currentCollation() as UILocalizedIndexedCollation
private var sections: [[String]] = []
let selector: Selector = ""
sections = [[String]](count: collation.sectionTitles.count, repeatedValue: [])
for object in uniqueOrganizationsArray {
let sectionNumber = collation.sectionForObject(object, collationStringSelector: selector)
sections[sectionNumber].append(object as String)
}
我应该在String 对象上使用什么选择器?
【问题讨论】:
标签: ios swift uilocalizedcollation