Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

22. Core Animation Layer > Implicitly Animatable Properties

Implicitly Animatable Properties

Several of the properties of CALayer are implicitly animatable. This means that changes to these properties are automatically animated when their setters are called. The property position is an implicitly animatable property. Sending the message setPosition: to a CALayer doesn’t just move the layer to a new position; it animates the change from the old position to the new one.

In this section, you will have the application respond to user taps: the boxLayer will move to wherever the user starts a touch. This change in position will be animated because position is an implicitly animatable property.

In HypnosisView.m, implement touchesBegan:withEvent: to change the layer’s position.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint