# 生成随机数

Posted by Elton's Blog on October 16, 2009

// Get random number between 0 and 500
int x = arc4random() % 100;

// Get random number between 500 and 1000
int y =  (arc4random() % 501) + 500);


arc4random()的好处是不用seed