Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想对数组进行排序使用 NSSortDescriptor 不会删除数组中的重复项
NSSortDescriptor 仅排序,不会删除重复项。您必须先删除重复项,然后再检查:
删除 nsarray 中的重复项
然后使用 NSSortDescriptor
NSSet或者,从您的数组中创建一个并对其进行排序?
NSSet