uaecasher macrumors 65816 Original poster Jul 2, 2010 #1 Hello, I want to keep changing the position of an image on screen randomly, not sure how make this, I searched around but didn't find something useful, any help would be much appreciated.
Hello, I want to keep changing the position of an image on screen randomly, not sure how make this, I searched around but didn't find something useful, any help would be much appreciated.
MacKeeper-fan macrumors member Jul 2, 2010 #2 just call arc4random() for the coordinate center of the image. something like: myImage.center = CGRectPoint(arc4random() % 320, arc4random() % 480); better put in some more maths into it, so that it caters for the width/height of the image.
just call arc4random() for the coordinate center of the image. something like: myImage.center = CGRectPoint(arc4random() % 320, arc4random() % 480); better put in some more maths into it, so that it caters for the width/height of the image.