The approach the other posters have outlined is good, as far as it goes.
However, you should not do animation the way you are doing it.
You should use core animation to set up an animation that moves your snowflakes from the top to the bottom of the screen in 1 step. The system will take care of animating the motion. It will be smoother than moving the views yourself, it will be less prone to problems if your program gets busy doing something else, and it will put a MUCH smaller load on the system, because it uses the graphics hardware to do the animation, and it uses highly optimized system frameworks to do the animation.
Take a look at the UIView animation class methods who's names start with animateWithDuration.
You probably want animateWithDuration:delayptions:animations:compl etion:
That method will let you specify that you want linear animation (options = UIViewAnimationOptionCurveLinear) , and will also let you include a completion routine that will start the animation over once the objects reach the bottom of the screen.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Hey, I have a question, if i paste it in my project with my image names in my
-(void) moveObjekt.
i have an error: "Use of undeclared identifier 'should_continue_animation'"
Hey, I have a question, if i paste it in my project with my image names in my
-(void) moveObjekt.
i have an error: "Use of undeclared identifier 'should_continue_animation'"
please help me
Post a new thread.
Include the relevant code. You're saying that you have a method moveObjekt, but did not show that code. It sounds like that method tries to use a boolean should_continue_animation, but we don't know what that is.
Again, create a new thread with your specific question and the background info we need to help you.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.