I have used rand(). But it gives a specific value even after I restart application.
I have implemented following in my application.
- (void)viewDidLo
Random number generators in software will actually give PSEUDORANDOM sequences of values.
Unless you seed the random number generator with a value from a truly random event, you will always get the same sequence each time you use the software.
I don't know about your software, but it doesn't look like you're seeding the random number generator, Gcamp is probably on the right track.