Previously I mentioned an excellent library allowing you to create UIView animations with a cleaner blocks based syntax.
Here’s another interesting library from Martin Kiss for working with UIView animations called UIView+AnimatedProperty. The main part of this library is a category, and allows you to create accessible properties that can be modified elsewhere in your code.
Here’s an included example that shows how this can work – notice how duration and timingFunction are set to variables defined in the library, and a custom property is set as the toValue.
// You can access duration and timing function is created for you from options
animation.duration = [[UIView currentAnimation] duration];
animation.timingFunction = [[UIView currentAnimation] timingFunction];
animation.toValue = @(cornerRadius);
animation.fillMode = kCAFillModeForwards;
animation.removedOnCompletion = NO;
[self.layer addAnimation:animation forKey:@"setCornerRadius:"];
Then you can simply set up the animation with:
myView.cornerRadius = 50;
}];
You can find UIView-Animated Property on Github here.
A very clever UIView extensions.
- Open Source Tween Library W/Concise UIView Animation Syntax And Ability To Tween Any Numeric Value
- UIView Category Adding Simple Frame Changes And Command Chaining
- Open Source CAkeyFrameAnimation Library For Easier Animation Sequence Creation
- Best Resources In iOS Development – June 4th, 2012
- Category Allowing You To Recreate The Mac OS X Genie Animation Effect On An iOS UIView
Original article: iOS UIView Category Allowing You To Set Up Customizable Animation Properties
©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.





