Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

Thread: Random Rocks
View Single Post
Old 01-06-2010, 02:53 PM   #21 (permalink)
kdp8791
Registered Member
 
Join Date: Sep 2009
Posts: 57
kdp8791 is on a distinguished road
Default

Thats what I am trying to do as well. I only want one image falling from the top at a time and when that image rolls off the screen another falls. But for some reason, when the view loads the images just appear on the screen as if they were placed there from Interface Builder in one solid location. No movement nothing. I have setup the NSTimer as well, so I am not sure what is wrong and why it's not moving.

Quote:
Originally Posted by smasher View Post
Your moveMeteors method needs to loop through all of the meteors in the meteorArray. The post I responded to only wanted one meteor at a time.

Code:
-(void)moveMeteors{
	
	for (UIImageView* myRock in meteorArray ){

		//move new center down
		CGPoint newCenter = myRock.center;
		newCenter.y = newCenter.y +10;
			
		if (newCenter.y > 480){ // if off the bottom
			newCenter.y=0;   //pop to top
			newCenter.x = arc4random()%320;  //and pick new x position
		}

		myRock.center = newCenter;
	}
}
__________________
kdp8791 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,427
Threads: 94,023
Posts: 402,573
Top Poster: BrianSlick (7,978)
Welcome to our newest member, shakiraeb60
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:42 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.