|Jul 2, 2010, 04:08 AM||#1|
UIImage In random positions on screen.
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.
|Jul 2, 2010, 04:24 AM||#2|
just call arc4random() for the coordinate center of the image.
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.
MacKeeper-all in one solution for your mac
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Random pixels on screen, in video and otherwise||ryanoryan||iMac||4||Jul 27, 2011 09:13 PM|
|UIImage in a fine quality whatever the device||AsTare||iPhone/iPad Programming||0||Nov 23, 2010 05:00 AM|
|Parallels: Windows Live Messenger launches in undesired position on screen.||CBGFilms||Windows, Linux & Others on the Mac||0||May 31, 2010 02:39 PM|
|random placement on screen||macfanboy||iPhone/iPad Programming||2||Jul 28, 2008 03:27 PM|
|Iphone + random tapping on screen (NOT FROM ME) = no fun||Chilekj||iPhone Tips, Help and Troubleshooting||0||May 21, 2008 12:46 AM|
All times are GMT -5. The time now is 11:52 AM.