int num = (arc4random() % 1000000);
NSString *randomNumber = [NSString stringWithFormat:@"%.6d", num];
self.randomNumber = randomNumber;
int num = (arc4random() % 1000000);
NSString *randomNumber = [NSString stringWithFormat:@"%.6d", num];
self.randomNumber = randomNumber;
本文标题:2 -- 生成随机数
本文链接:https://www.haomeiwen.com/subject/ldqrsttx.html
网友评论