f you need to generate a random number within your iPhone application, you have to push aside Objective-C, as there is not a class with a method for generating random numbers (as in Java). The alternative is to use C, among the functions available are: rand(), srand(), random(),srandom() and arc4random().
arc4random() tends to be preferred as it does not require seeding, the function automatically initializes itself.