O'Reilly logo

The Complete Idiot's Guide® To iPad and iPhone App Development by Troy Brant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Intro to Animations

The easiest way to add animations to your application is using the UIView animation class methods. For instance, the following code demonstrates how to fade out a view:
383
The default alpha value for a view starts at 1, which means the view is not transparent at all. Over the course of two seconds, the view will fade out until it is completely invisible.
384
ONE MORE THING
Note that all the UIView methods above are called directly on the UIView class itself—not on a UIView instance. That’s because beginAnimations:contentxt:, setAnimationDuration:, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required