Upvote:2

Aprove answer
index = [NSNumber numberWithInt:arc4random_uniform(5)];

Upvote:0

 arc4random(5)

Credit Goes to: stackoverflow.com

Related question with same questions but different answers