I have used rand(). But it gives a specific value even after I restart application.
I have implemented following in my application.
- (void)viewDidLo
Since you are using random() and not rand() you should seed the random generator with this bit of code...
srandomdev();