diff --git a/Motion.podspec b/Motion.podspec index fab1d7c..d550215 100755 --- a/Motion.podspec +++ b/Motion.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Motion' - s.version = '1.3.4' + s.version = '1.3.5' s.license = 'MIT' s.summary = 'A library used to create beautiful animations and transitions for Apple devices.' s.homepage = 'http://cosmicmind.com' diff --git a/Sources/Extensions/Motion+CALayer.swift b/Sources/Extensions/Motion+CALayer.swift index 70ccf0b..0bd6a03 100644 --- a/Sources/Extensions/Motion+CALayer.swift +++ b/Sources/Extensions/Motion+CALayer.swift @@ -199,7 +199,7 @@ fileprivate extension CALayer { ts = ts, completion = completion] in - guard let s = self else { + guard let `self` = self else { return } @@ -208,31 +208,31 @@ fileprivate extension CALayer { if let v = ts.backgroundColor { let a = MotionCAAnimation.background(color: UIColor(cgColor: v)) - a.fromValue = s.backgroundColor + a.fromValue = self.backgroundColor anims.append(a) } if let v = ts.borderColor { let a = MotionCAAnimation.border(color: UIColor(cgColor: v)) - a.fromValue = s.borderColor + a.fromValue = self.borderColor anims.append(a) } if let v = ts.borderWidth { let a = MotionCAAnimation.border(width: v) - a.fromValue = NSNumber(floatLiteral: Double(s.borderWidth)) + a.fromValue = NSNumber(floatLiteral: Double(self.borderWidth)) anims.append(a) } if let v = ts.cornerRadius { let a = MotionCAAnimation.corner(radius: v) - a.fromValue = NSNumber(floatLiteral: Double(s.cornerRadius)) + a.fromValue = NSNumber(floatLiteral: Double(self.cornerRadius)) anims.append(a) } if let v = ts.transform { let a = MotionCAAnimation.transform(v) - a.fromValue = NSValue(caTransform3D: s.transform) + a.fromValue = NSValue(caTransform3D: self.transform) anims.append(a) } @@ -252,55 +252,55 @@ fileprivate extension CALayer { if let v = ts.position { let a = MotionCAAnimation.position(v) - a.fromValue = NSValue(cgPoint: s.position) + a.fromValue = NSValue(cgPoint: self.position) anims.append(a) } if let v = ts.opacity { let a = MotionCAAnimation.fade(v) - a.fromValue = s.value(forKeyPath: MotionAnimationKeyPath.opacity.rawValue) ?? NSNumber(floatLiteral: 1) + a.fromValue = self.value(forKeyPath: MotionAnimationKeyPath.opacity.rawValue) ?? NSNumber(floatLiteral: 1) anims.append(a) } if let v = ts.zPosition { let a = MotionCAAnimation.zPosition(v) - a.fromValue = s.value(forKeyPath: MotionAnimationKeyPath.zPosition.rawValue) ?? NSNumber(floatLiteral: 0) + a.fromValue = self.value(forKeyPath: MotionAnimationKeyPath.zPosition.rawValue) ?? NSNumber(floatLiteral: 0) anims.append(a) } if let v = ts.size { let a = MotionCAAnimation.size(v) - a.fromValue = NSValue(cgSize: s.bounds.size) + a.fromValue = NSValue(cgSize: self.bounds.size) anims.append(a) } if let v = ts.shadowPath { let a = MotionCAAnimation.shadow(path: v) - a.fromValue = s.shadowPath + a.fromValue = self.shadowPath anims.append(a) } if let v = ts.shadowColor { let a = MotionCAAnimation.shadow(color: UIColor(cgColor: v)) - a.fromValue = s.shadowColor + a.fromValue = self.shadowColor anims.append(a) } if let v = ts.shadowOffset { let a = MotionCAAnimation.shadow(offset: v) - a.fromValue = NSValue(cgSize: s.shadowOffset) + a.fromValue = NSValue(cgSize: self.shadowOffset) anims.append(a) } if let v = ts.shadowOpacity { let a = MotionCAAnimation.shadow(opacity: v) - a.fromValue = NSNumber(floatLiteral: Double(s.shadowOpacity)) + a.fromValue = NSNumber(floatLiteral: Double(self.shadowOpacity)) anims.append(a) } if let v = ts.shadowRadius { let a = MotionCAAnimation.shadow(radius: v) - a.fromValue = NSNumber(floatLiteral: Double(s.shadowRadius)) + a.fromValue = NSNumber(floatLiteral: Double(self.shadowRadius)) anims.append(a) } @@ -326,7 +326,7 @@ fileprivate extension CALayer { g.isRemovedOnCompletion = false g.timingFunction = ts.timingFunction - s.animate(g) + self.animate(g) if let v = ts.completion { Motion.delay(duration, execute: v) diff --git a/Sources/Info.plist b/Sources/Info.plist index e4a695b..b659fc6 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.3.4 + 1.3.5 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Transition/MotionTransition.swift b/Sources/Transition/MotionTransition.swift index 62749db..42b2462 100644 --- a/Sources/Transition/MotionTransition.swift +++ b/Sources/Transition/MotionTransition.swift @@ -559,12 +559,12 @@ internal extension MotionTransition { } processForMotionDelegate(viewController: tvc) { [weak self] in - guard let s = self else { + guard let `self` = self else { return } - $0.motion?(motion: s, willStartTransitionFrom: fvc) - $0.motionWillStartTransition?(motion: s) + $0.motion?(motion: self, willStartTransitionFrom: fvc) + $0.motionWillStartTransition?(motion: self) } }