Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Animating snow falling

I just want to animate snowflakes/other objects in the background falling down. I know a couple of ways to do this, but am really looking for the most efficient solution. I could use this doing a UIView block animation. I would have it start at the top of the screen and animate to the bottom of the screen over a period of time, then on completion start it again at the top. Is that a good way to do it? I'm looking for efficiency here.

like image 716
spentak Avatar asked Nov 10 '11 16:11

spentak


People also ask

How do you make your Iphone snow?

For a few years now, you can make it snow while shopping in the Apple Store app, and the snow is back this season. To participate in the festivities, all you have to do is type “let it snow” in the search field and once you tap Return, little snowflakes will float from the top to the bottom of the screen.


2 Answers

You want a CAEmitterLayer! http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAEmitterLayer_class/Reference/Reference.html

It's iOS 5 only though.

http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAEmitterLayer_class/Reference/Reference.html

like image 165
Randall Avatar answered Sep 22 '22 07:09

Randall


It's only $8 for 71Squared's emitter. You can pretty much copy and paste the code. But it's biggest advantage is configuring the particles exactly the way you want, which can be more time-consuming than figuring out how to make particles in the first place.

http://particledesigner.71squared.com/

like image 44
TigerCoding Avatar answered Sep 26 '22 07:09

TigerCoding