标签:顺序 -- pre and random ios int objc tor
NSArray* arr = @[@"1",@"2",@"3"]; arr = [arr sortedArrayUsingComparator:^NSComparisonResult(NSString *str1, NSString *str2) { int seed = arc4random_uniform(2); if (seed) { return [str1 compare:str2]; } else { return [str2 compare:str1]; }
标签:顺序 -- pre and random ios int objc tor
原文地址:https://www.cnblogs.com/shenlaiyaoshi/p/9436662.html