Part of what I'm developing is a random company name generator. It draws from several arrays of name parts. I use the rand()
function to draw the random name parts. However, the same "random" numbers are always generated in the same sequence every time I launch the app, so the same names always appear.
So I searched around SO, and in C there is an srand()
function to "seed" the random function with something like the current time to make it more random - like srand(time(NULL))
. Is there something like that for Objective-C that I can use for iOS development?