PRTween icon indicating copy to clipboard operation
PRTween copied to clipboard

Add Core Animation / UIView fallbacks

Open domhofmann opened this issue 14 years ago • 3 comments

This is starting to look like a pretty good drop-in replacement for all animations with the introduction of shorthands. I think it would be valuable to add a way to fall back to Core Animation or UIView animation, while still using the syntax here.

domhofmann avatar Sep 06 '11 16:09 domhofmann

Basic support for this has been committed. There is still some more work to be done, but in general using the shorthand syntax for something that can be animated with Core Animation or UIView will fall back to one of those models.

For example: [PRTween tween:someView property:@"alpha" from:1 to:0 duration:2] would use a UIView animation. I'm working on adding support to allow someone to turn this off on a case-by-case basis, but for now it can be turned off through the useBuiltInAnimationsWhenPossible property on PRTween (or [PRTween sharedInstance])

domhofmann avatar Sep 09 '11 18:09 domhofmann

Additionally, fallbacks can be overridden on a case-by-case basis like this:

[PRTween tween:someView property:@"alpha" from:1 to:0 duration:2].override = YES;

domhofmann avatar Sep 09 '11 20:09 domhofmann

There's some remaining work on this ticket before we have full coverage on all built in animations, but the existing code base covers most basic cases now.

domhofmann avatar Dec 23 '11 15:12 domhofmann