Currently, Objective-C does not support a class that provides a simple way to generate a random number. Anyway, we can use some C functions like: rand(), srand(), random(), srandom() e arc4random().

The most used function is arc4random() because no needs to init or seed functions and return a good random number.

// generate a random number from 0 to 99
int rnd = arc4random() % 100;
// generate a random number between 20 to 70 (thx Luca)
int rnd =  (arc4random() % 51) + 20;