“rowNumber” 的记录如下:79050688。"rowNumberAsInt" 被记录为16以下的数字。如何正确转换我的 int?
-(int)randomNumberGenerator{
int rowNumberAsInt;
NSNumber *rowNumber;
randomNumberPool = [[NSMutableArray alloc]initWithCapacity:16];
while (![randomNumberPool containsObject:rowNumber]) {
rowNumberAsInt = (arc4random() % 16);
rowNumber = [NSNumber numberWithInt:rowNumberAsInt];
[randomNumberPool addObject:rowNumber];
}
NSLog(@"random rowNumber: %d ", rowNumber);
NSLog(@"random rowNumberAsInt: %d ", rowNumberAsInt);
return rowNumberAsInt;
}