I'm trying to put some objects in the screen at random positions.
I use arc4random() to generate a new random number.
But it seems that the function is not working properly, here's the code and traced result:
Code :
UIView *stateView = [[UIView alloc] initWithFrame:CGRectMake( (arc4random()%700)-100 , (20 * 91) + 378 + ((arc4random()%600)+200), 325 , 188)];
NSLog(@"Note %d : X = %f , Y = %f",i,stateView.frame.origin.x,stateView.frame.origin.y);
**********************
NSLog Output :
Note 5 : X = 4294967040.000000 , Y = 2552.000000
Is this a bug or I'm doing wrong with the generator ?