-
Notifications
You must be signed in to change notification settings - Fork 2.9k
keyPath property animations #274
base: master
Are you sure you want to change the base?
Conversation
… issue where UIEdgeINsets was not ifdef'd out for PHONE only.
* master: Update podspec to 1.0.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty rad. The only thing I'm concerned with is the overhead introduced by executing -valueForKeyPath:
every frame (rather than directly accessing the property itself). It's not a major concern, but I'd rather -animationForKeyPath:
not become the default use-case.
pop/POPAnimatablePropertyInternal.h
Outdated
// Created by Alexander Cohen on 2015-09-16. | ||
// Copyright © 2015 Facebook. All rights reserved. | ||
// | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get this header setup to be the same as the other headers? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken care of in f55f93c
[(CALayer*)[layer expect] setPosition:FBTestInterpolateLinear(Vector2r([anim.fromValue CGPointValue]), Vector2r([anim.toValue CGPointValue]), 0.25).cg_point()]; | ||
[(CALayer*)[layer expect] setPosition:FBTestInterpolateLinear(Vector2r([anim.fromValue CGPointValue]), Vector2r([anim.toValue CGPointValue]), 0.5).cg_point()]; | ||
[(CALayer*)[layer expect] setPosition:FBTestInterpolateLinear(Vector2r([anim.fromValue CGPointValue]), Vector2r([anim.toValue CGPointValue]), 0.75).cg_point()]; | ||
[(CALayer*)[layer expect] setPosition:[anim.toValue CGPointValue]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for updating these!
Added keyPath to POPPropertyAnimation
This enables POPPropertyAnimation.property to be automatically filled in by the engine instead of having to enter it yourself.
That code will have the engine first check the object it was added to for a method named animationPropertyForContentOffset. If found, it will be called to fill in the property. If not, the engine will then call [object valueForKeyPath:keyPath] in order to figure out what kind of value should be passed around. Then it sets up the property for that that type of value.
Slipped in GLKit data type support
2 new types were added, GLKVector3 and GLKQuaternion. GLKVector3 can be used everywhere and GLKQuaternion can be used everywhere except for velocities.