About This
I am Michael Tyson, and I run A Tasty Pixel. I write on a variety of technology and software development topics as I travel around Europe in a motorhome.
-
Subscribe to updates 509 feed subscribers
Follow me on Twitter 863 followers
Our Products
Newsletter
Let us keep you informed about important updates, special offers, and new products. Just type in your email address below and hit enter to sign up!
-
Recent Posts
Topics
Audio Business Career Cocoa Code Data Debugging Demo Design Development Geocoding Google Graphics Interface iPad iPhone Lifestyle Links Location Loopy Loopy HD Mac Maps Marketing Networking PHP Scripts Security Shell Social Comment Software Talkie Talkie-for-Mac The Cartographer Travel Tutorial Twitter Update Web Webapps WordPress WordPress Plugins WordPress Themes Workflow XCode



iPhone/Mac animation for custom classes: Property animation for more than just CALayer
I recently wrote a custom view — a 3D vintage-looking pull lever — that provided a continuous property to control the state. I wanted to animated this smoothly, a-la CABasicAnimation, but couldn’t find a built-in way to do so.
So, I wrote a class that provides similar functionality to CABasicAnimation, but works on any object. I thought I’d share it.
Features:
NSNumberand scalar numeric types, but easily extendable)chainedAnimation, and it’ll be fired once the first animation completes)CADisplayLinkif available, to update in sync with screen updatesUse it like this:
Make sure you also include the QuartzCore framework, used to access
CADisplayLink, if it’s available.It’s BSD-licensed.
Grab it here: TPPropertyAnimation.zip
Related posts