Skip to content

Commit 9349e5b

Browse files
committed
Updated hinge animation effect using by value.
1 parent b9ba845 commit 9349e5b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

AXAnimationChain/Classes/Swifty/UIView+Effects.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public extension UIView {
125125
///
126126
public func hinge(completion: @escaping () -> Void = {}) {
127127
layer.anchorToLeftTop()
128-
chainAnimator.spring.property("transform.rotation").fromValue(0).toValue(acos(Double(bounds.height)/Double(pow(pow(bounds.width, 2.0)+pow(bounds.height, 2.0), 0.5)))).mass(2).stiffness(100).damping(10).combineBasic().beginTime(1.0).property("position.y").fromValue(layer.position.y).toValue(UIScreen.main.bounds.height+layer.position.y).duration(0.5).easeInCubic().start(completion: completion)
128+
chainAnimator.spring.property("transform.rotation").fromValue(0).toValue(acos(Double(bounds.height)/Double(pow(pow(bounds.width, 2.0)+pow(bounds.height, 2.0), 0.5)))).mass(2).stiffness(100).damping(10).combineBasic().beginTime(1.0).property("position.y").byValue(UIScreen.main.bounds.height).duration(0.5).easeInCubic().start(completion: completion)
129129
}
130130
/// Run a \`drop\` animation effect on the receiver.
131131
///

0 commit comments

Comments
 (0)