NSSortDescriptor issue

前端 未结 4 2007
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-13 20:24

I am making a contact book App where I am fetching names from AddressBook and stored them in Core data and displayed the names on a table using NSFetchedResultsControl

4条回答
  •  攒了一身酷
    2021-01-13 21:03

    You can do this:

    sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"fullName" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)];
    

    Just make sure it doesn't affect performance in your case.

提交回复
热议问题