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

Figuring Out When the Animation Is Done

To detect when the animation completes and reset the toy view position, add the following delegate method:
407
Then, arrange for the method to be called when the animation ends by adding the code in bold to the animation bock in viewDidAppear:.
408
Now, save your code, and run it to see what happens. As you can see, the view stays put this time because you reset its position to where it was when the animation started.
ONE MORE THING
You may have noticed that there are a few different ways to position a view. ...

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