Search code examples
iphoneiosobjective-cios5core-animation

iOS UIViewController with simple animations


I need to be able to create a few simple animations in a UIView. My main question is how to achieve this in the simplest way possible while being extremely efficient with the memory being used.

My goal is to have a few graphics such as clouds, floating around on a main UIView.

These graphics have to continue moving throughout the time the user is interacting with the other parts of the views such as pressing buttons and such. Thus the animations have to be pretty lightweight.

Could you point me to what I should look at?

Thanks!


Solution

  • You could have a look at UIView.

    The simplest way is

    [UIView beginAnimations:@"Some animations" context:nil];
    self.anyViewOutlet.anyAnimatableProperty = value after animation;
    ...
    [UIView commitAnimations];
    

    You could also try to work with particles, which maybe looks a bit more impressive. http://www.raywenderlich.com/6063/uikit-particle-systems-in-ios-5-tutorial

    The tutorial shows how to generate fire particles, but it also works with cloud images.