Have an NSMutableArray, and when my users press a button, I'd like all items in the array to randomly change position, !! except for the first !!.
Right now I have
-(void)shufflemyList{
NSLog(@"Un Shuffled array : %@",myList);
NSMutableArray *array = [NSMutableArray arrayWithCapacity:0];
while ([myList count] > 0)
{
int index = arc4random() % [myList count];
id objectToMove = [myList objectAtIndex:index];
[array addObject:objectToMove];
[myList removeObjectAtIndex:index]; }
// test
NSLog(@"Shuffled array : %@",array);
myList=array; }
This works to completely shuffle the list. Is there a way to shuffle the whole list, excepting the first item?