Basic Core Animation — iPhone

15 Jun

I’ve previously posted something about Core Animation which was sort of incorrect. I stated that a layer’s delegate must be set in order to have a working animation. Well of course I wasn’t correct. Core Animation requires Animation Blocks which can be ‘created’ with UIView. Well what did I know back then! Here’s the correct code to  get a working implicit core animation working:

[UIView beginAnimations:@"Identifier describing your animation context:nil];
CALayer *layer = self.view.layer;
layer.opacity = 0.1;
layer.transform = CATransform3DMakeScale(.001, .001, .001);
[UIView commitAnimations];

And there we have it :)


One Response to “Basic Core Animation — iPhone”


  1. Basic CA (Core Animation) for your iPhone « Spiced Cocoa - 15 June, 2010

    […] May UPDATE: New post can be found here. Below’s content is […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: