我在对包含 int 的 NSStrings 的 NSMUtableArray 进行排序时遇到了一个小问题。我是这样排序的
scoreString=[NSString stringWithFormat:@"%lld",GameScore];
[scorearr addObject:scoreString];
NSSortDescriptor* sortOrder = [NSSortDescriptor sortDescriptorWithKey: @"self" ascending: NO];
NSArray *scoreArray= [scorearr sortedArrayUsingDescriptors: [NSArray arrayWithObject: sortOrder]];
scorearr =(NSMutableArray *)ary;