NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"self" ascending:YES];
sortedFloats = [Arr_distance sortedArrayUsingDescriptors:
[NSMutableArray arrayWithObject:sortDescriptor]];
其中sortedFloats
和Arr_distance
都是NSMutsbleArray
然后就会得到警报:
incompatible pointer types assigning to 'nsmutablearray ' from 'nsarray '
但是最终结果是正确的,警报是怎么回事?谢谢指点。