I have used rand(). But it gives a specific value even after I restart application.
I have implemented following in my application.
- (void)viewDidLo
arc4random() is a built-in function that does not require seeding (and so therefore does not produce predictable sequences that can be generated by using a seed), and it conveniently returns integers. I never use anything else.
arc4random()