Sweet! It's working! Thank you SO MUCH. If I setup a new NSTimer is it possible to use it to delay image's from falling rather than it just fall immediately after the other disappears.
Quote:
Originally Posted by smasher
If you only want one meteor, you should not create the array of meteors; you should just create one meteor "myRock". I also changed it to "y = 0" - if you're only making one rock it makes sense to put it at the top of the screen, not far off the top like the other code.
Code:
-(void)createMeteors{
UIImage *meteorImage = [UIImage imageNamed:@"flake.png"];
myRock= [[UIImageView alloc] initWithImage: meteorImage];
//pick a position *above* the top of the screen
int x = arc4random()%320;
int y = 0; // place at top of the screen
myRock.center = CGPointMake (x,y);
[self.view addSubview: myRock]; //adds meteors as subviews
[myRockrelease];
}
|