I want to sort an array using NSSortDescriptor

前端 未结 7 2326
感情败类
感情败类 2020-12-04 15:04

I am having a problem regarding sorting an array w.r.t database:

NSSortDescriptor *sorter = [[NSSortDescriptor alloc] initWithKey:@\"w\" ascending:YES];
NSAr         


        
相关标签:
7条回答
  • 2020-12-04 15:58

    Just use NSSortDescriptor like I used and It worked fine.

       NSSortDescriptor * sortByRank = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES selector:@selector(caseInsensitiveCompare:)];
    
    0 讨论(0)
提交回复
热议问题