我正在尝试随机化数组中的数字。我可以使用arc4random() % [indexes count] 
我的问题是 - 如果一个数组由 20 个项目组成,那么每次数组洗牌时,在一批 5 中,应该出现不同的数字。例子 :
第一次洗牌:1,4,2,5,6。
第二次洗牌:7,12,9,15,3
-(IBAction)randomNumbers:(UIButton *)sender
{
    int length = 10; // int length = [yourArray count];
    NSMutableArray *indexes = [[NSMutableArray alloc] initWithCapacity:length];
    for (int i=0; i<5; i++)
        [indexes addObject:[NSNumber numberWithInt:i]];
    NSMutableArray *shuffle = [[NSMutableArray alloc] initWithCapacity:length];
    while ([indexes count])
    {
        int index = arc4random() % [indexes count];
        [shuffle addObject:[indexes objectAtIndex:index]];
        [indexes removeObjectAtIndex:index];
    }
    //    for (int i=0; i<[shuffle count]; i++)
    NSLog(@"%@", [shuffle description]);
}