Objective-C 随机数时间:2022-04-12 14:51:38有个项目要给客户发送随机验证码, 试了下这样可以 srand(time()); code = [NSString stringWithFormat:@"%d", (rand() % ( - )) + ];