是否无法使用NSSortDescriptor按BOOL属性排序?

nmd*_*ias 2 sorting core-data objective-c nssortdescriptor ios

我需要对我的部分中的行进行排序fetchedResultsController.

我正在尝试确保将lastCell属性设置为的Entity YES成为其中最后一个显示的单元格.不知何故,它始终是第一个?这不可能吗?

从timeStamp订购非常好.lastCell另一方面似乎没有任何影响.

NSSortDescriptor *sortDescriptor1 = [[NSSortDescriptor alloc] initWithKey:@"timeStamp" ascending:NO];
NSSortDescriptor *sortDescriptor2 = [[NSSortDescriptor alloc] initWithKey:@"lastCell"  ascending:NO];
Run Code Online (Sandbox Code Playgroud)

Joh*_*ger 5

将lastCell的NSSortDescriptor设置为升序.毕竟,False(又名0)出现在True(1)之前.