File tree Expand file tree Collapse file tree
AXAnimationChain/Classes/Swifty Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,6 +139,9 @@ public extension UIView {
139139 /// - Parameter completion: a completion closure to execute when the animation finished.
140140 ///
141141 public func morph( completion: @escaping ( ) -> Void = { } ) {
142- chainAnimator. basic. property ( " transform.scale.y " ) . duration ( 0.5 ) . toValue ( 0.5 ) . linear ( ) . combineBasic ( ) . property ( " transform.scale.x " ) . duration ( 0.5 ) . toValue ( 1.5 ) . linear ( ) . nextToBasic ( ) . property ( " transform.scale.y " ) . duration ( 0.5 ) . toValue ( 1.5 ) . linear ( ) . combineBasic ( ) . property ( " transform.scale.x " ) . duration ( 0.5 ) . toValue ( 0.5 ) . linear ( ) . nextToBasic ( ) . property ( " transform.scale.y " ) . duration ( 0.5 ) . toValue ( 0.5 ) . linear ( ) . combineBasic ( ) . property ( " transform.scale.x " ) . duration ( 0.5 ) . toValue ( 1.5 ) . linear ( ) . nextToBasic ( ) . property ( " transform.scale.y " ) . duration ( 0.5 ) . toValue ( 1.0 ) . linear ( ) . combineBasic ( ) . property ( " transform.scale.x " ) . duration ( 0.5 ) . toValue ( 1.0 ) . linear ( ) . start ( completion: completion)
142+ let duration = 0.25 ;
143+ let minscale = 0.8 ;
144+ let maxscale = 1.2 ;
145+ chainAnimator. basic. property ( " transform.scale.y " ) . duration ( duration) . toValue ( minscale) . linear ( ) . combineBasic ( ) . property ( " transform.scale.x " ) . duration ( duration) . toValue ( maxscale) . linear ( ) . nextToBasic ( ) . property ( " transform.scale.y " ) . duration ( duration) . toValue ( maxscale) . linear ( ) . combineBasic ( ) . property ( " transform.scale.x " ) . duration ( duration) . toValue ( minscale) . linear ( ) . nextToBasic ( ) . property ( " transform.scale.y " ) . duration ( duration) . toValue ( minscale) . linear ( ) . combineBasic ( ) . property ( " transform.scale.x " ) . duration ( duration) . toValue ( maxscale) . linear ( ) . nextToBasic ( ) . property ( " transform.scale.y " ) . duration ( duration) . toValue ( 1.0 ) . linear ( ) . combineBasic ( ) . property ( " transform.scale.x " ) . duration ( duration) . toValue ( 1.0 ) . linear ( ) . start ( completion: completion)
143146 }
144147}
You can’t perform that action at this time.
0 commit comments