Skip to content

Commit 582a94a

Browse files
committed
Added from value of timing functions extensions.
1 parent 9c6630c commit 582a94a

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

AXAnimationChain/Classes/UIView+AnimationChain.m

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,32 +647,38 @@ - (instancetype)easeInOutBack {
647647
}
648648

649649
- (instancetype)easeInElastic {
650-
[self.chainAnimator.topAnimator.combinedAnimators.lastObject.beginBasic easeInElastic];
650+
AXChainAnimator *lastAnimator = self.chainAnimator.topAnimator.combinedAnimators.lastObject;
651+
[lastAnimator.beginBasic.fromValue([self.layer valueForKey:((CAPropertyAnimation *)lastAnimator.animation).keyPath]) easeInElastic];
651652
return self;
652653
}
653654

654655
- (instancetype)easeOutElastic {
655-
[self.chainAnimator.topAnimator.combinedAnimators.lastObject.beginBasic easeOutElastic];
656+
AXChainAnimator *lastAnimator = self.chainAnimator.topAnimator.combinedAnimators.lastObject;
657+
[lastAnimator.beginBasic.fromValue([self.layer valueForKey:((CAPropertyAnimation *)lastAnimator.animation).keyPath]) easeOutElastic];
656658
return self;
657659
}
658660

659661
- (instancetype)easeInOutElastic {
660-
[self.chainAnimator.topAnimator.combinedAnimators.lastObject.beginBasic easeInOutElastic];
662+
AXChainAnimator *lastAnimator = self.chainAnimator.topAnimator.combinedAnimators.lastObject;
663+
[lastAnimator.beginBasic.fromValue([self.layer valueForKey:((CAPropertyAnimation *)lastAnimator.animation).keyPath]) easeInOutElastic];
661664
return self;
662665
}
663666

664667
- (instancetype)easeInBounce {
665-
[self.chainAnimator.topAnimator.combinedAnimators.lastObject.beginBasic easeInBounce];
668+
AXChainAnimator *lastAnimator = self.chainAnimator.topAnimator.combinedAnimators.lastObject;
669+
[lastAnimator.beginBasic.fromValue([self.layer valueForKey:((CAPropertyAnimation *)lastAnimator.animation).keyPath]) easeInBounce];
666670
return self;
667671
}
668672

669673
- (instancetype)easeOutBounce {
670-
[self.chainAnimator.topAnimator.combinedAnimators.lastObject.beginBasic easeOutBounce];
674+
AXChainAnimator *lastAnimator = self.chainAnimator.topAnimator.combinedAnimators.lastObject;
675+
[lastAnimator.beginBasic.fromValue([self.layer valueForKey:((CAPropertyAnimation *)lastAnimator.animation).keyPath]) easeOutBounce];
671676
return self;
672677
}
673678

674679
- (instancetype)easeInOutBounce {
675-
[self.chainAnimator.topAnimator.combinedAnimators.lastObject.beginBasic easeInOutBounce];
680+
AXChainAnimator *lastAnimator = self.chainAnimator.topAnimator.combinedAnimators.lastObject;
681+
[lastAnimator.beginBasic.fromValue([self.layer valueForKey:((CAPropertyAnimation *)lastAnimator.animation).keyPath]) easeInOutBounce];
676682
return self;
677683
}
678684

0 commit comments

Comments
 (0)