Open Source Tween Library W/Concise UIView Animation Syntax And Ability To Tween Any Numeric Value

Some time ago I mentioned a library allowing you to drastically shorten the syntax needed for UIView animation providing a clean blocks based animation syntax.

Today I came across a library known as PRTween that takes things another step further by providing a tween library for UIView animation (or any other numerical value).  You can tween properties UIView properties that you normally could not,  and the library provides a very elegant syntax with blocks based callbacks.

Here’s an example of a simple alpha tween with PRTween:

PRTweenPeriod *period = [PRTweenPeriod periodWithStartValue:100 endValue:200 duration:3];

Which is identical to this code without PRTween:

someView.alpha = 1;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:3];
someView.alpha = 0;
[UIView commitAnimations];

You can find the library from Dominik Hoffman with a complete example on Github here and the repository for an ARC compatible fork can be found on Github here.

A great looking library for easy UIView animations – or any numeric variable tweening.

©2012 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

.

DeliciousTwitterFacebookLinkedInEmail


Leave a Reply

Your email address will not be published. Required fields are marked *