zrxq/UIView-EasingFunctions — pull request #2 by cmezak (2013-05-03 20:27:56+00:00)
Title: Fixed CGFloat check and Swizzling logic

Original implementation swizzled the addAnimation method every time the first easing function was added to an instance of CALayer, but this only needs to have once for the whole class.

Now, the swizzling only happens the first time an easing function is added to CALayer and the swizzle is never undone. If there's a good reason to undo the swizzling (performance, maybe?), then we should use a static counter variable that instances increment/decrement as easing functions are added and removed. Once the counter reaches 0, we can unswizzle.

Also changed the check for the type of the original animation's from value so it catches both floats and doubles as CGFloat.