Introducing FTUtils: Open Source Utilities for iPhone Developers

For my Core Animation presentation at 360idev last year, I created a bunch of sample code to show how simple and powerful Core Animation is. I also promised that I would update the sample code with even more advanced examples. That has not really happened (yet!), and it is time for me to atone.

I am very excited to officially release a collection of utility code that I have accumulated over the past year: FTUtils! It is the first dependency I add to all of my projects, and I have already received enthusiastic feedback from developers who have stumbled on the github project.

It probably comes as no surprise that the bulk of FTUtils contains enhancements and extensions to the Core Animation API (called FTAnimation). I use Core Animation a lot, and I have tried to find elegant ways to round off some of the sharper edges of the API. FTUtils is not only about Core Animation, though. It features:

  • A category on UIView that puts 13+ canned animations only a method call away.
  • Access to the CAAnimation objects for the canned animations so you can mix and match them all you want.
  • Implementation of the target/action pattern for animation delegate callbacks. No more huge animationDidStop:finished: methods!
  • Simple chaining of an arbitrary number of animations.
  • Embedding of a pre or post animation delay directly in the CAAnimation object (useful for chaining).
  • performSelector* methods built for calling delegates that elegantly handle non-existent selectors and allow the passing of primitives as parameters.
  • Simple methods for reversing arrays.
  • A collection of macros to make common code patterns simpler to use.

Since I use FTUtils in all of my projects, it is updated regularly with bug fixes and new features. Currently, I am working hard at documenting the whole library at ftutils.com, and I will be pushing updates to the site as I finish chunks of the docs.

The iPhone developer community is an active and friendly one, and it has been very good to me. I am glad to have something to give back. Also, for those of you planning to attend 360idev this April (you should go…really), I will be speaking about advanced uses of Core Animation including an explanation of how everything in FTAnimation works.

One more thing…

Here’s a screencast showing off the canned animations in FTUtils. The code for this app is in the Examples directory of the project.

Enjoy!

kick it on iPhoneKicks.com

5 Responses to “Introducing FTUtils: Open Source Utilities for iPhone Developers”