Commit 1ef94e71 by Daniel Dahan

development: updated Animation to Motion

parent 486cab29
...@@ -184,13 +184,13 @@ open class Button: UIButton { ...@@ -184,13 +184,13 @@ open class Button: UIButton {
from the center. from the center.
*/ */
open func pulse(point: CGPoint? = nil) { open func pulse(point: CGPoint? = nil) {
let p: CGPoint = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point! let p = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point!
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse)
Animation.delay(time: 0.35) { [weak self] in Motion.delay(time: 0.35) { [weak self] in
guard let s = self else { guard let s = self else {
return return
} }
Animation.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse) Motion.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse)
} }
bringImageViewToFront() bringImageViewToFront()
...@@ -204,7 +204,7 @@ open class Button: UIButton { ...@@ -204,7 +204,7 @@ open class Button: UIButton {
*/ */
open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event) super.touchesBegan(touches, with: event)
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse)
bringImageViewToFront() bringImageViewToFront()
} }
...@@ -217,7 +217,7 @@ open class Button: UIButton { ...@@ -217,7 +217,7 @@ open class Button: UIButton {
*/ */
open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesEnded(touches, with: event) super.touchesEnded(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
/** /**
...@@ -228,7 +228,7 @@ open class Button: UIButton { ...@@ -228,7 +228,7 @@ open class Button: UIButton {
*/ */
open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesCancelled(touches, with: event) super.touchesCancelled(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
open func bringImageViewToFront() { open func bringImageViewToFront() {
......
...@@ -238,13 +238,13 @@ open class CollectionReusableView: UICollectionReusableView { ...@@ -238,13 +238,13 @@ open class CollectionReusableView: UICollectionReusableView {
from the center. from the center.
*/ */
open func pulse(point: CGPoint? = nil) { open func pulse(point: CGPoint? = nil) {
let p: CGPoint = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point! let p = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point!
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse)
Animation.delay(time: 0.35) { [weak self] in Motion.delay(time: 0.35) { [weak self] in
guard let s = self else { guard let s = self else {
return return
} }
Animation.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse) Motion.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse)
} }
} }
...@@ -256,7 +256,7 @@ open class CollectionReusableView: UICollectionReusableView { ...@@ -256,7 +256,7 @@ open class CollectionReusableView: UICollectionReusableView {
*/ */
open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event) super.touchesBegan(touches, with: event)
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse)
} }
/** /**
...@@ -267,7 +267,7 @@ open class CollectionReusableView: UICollectionReusableView { ...@@ -267,7 +267,7 @@ open class CollectionReusableView: UICollectionReusableView {
*/ */
open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesEnded(touches, with: event) super.touchesEnded(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
/** /**
...@@ -278,7 +278,7 @@ open class CollectionReusableView: UICollectionReusableView { ...@@ -278,7 +278,7 @@ open class CollectionReusableView: UICollectionReusableView {
*/ */
open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesCancelled(touches, with: event) super.touchesCancelled(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
/** /**
......
...@@ -245,13 +245,13 @@ open class CollectionViewCell: UICollectionViewCell { ...@@ -245,13 +245,13 @@ open class CollectionViewCell: UICollectionViewCell {
from the center. from the center.
*/ */
open func pulse(point: CGPoint? = nil) { open func pulse(point: CGPoint? = nil) {
let p: CGPoint = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point! let p = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point!
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse)
Animation.delay(time: 0.35) { [weak self] in Motion.delay(time: 0.35) { [weak self] in
guard let s = self else { guard let s = self else {
return return
} }
Animation.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse) Motion.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse)
} }
} }
...@@ -263,7 +263,7 @@ open class CollectionViewCell: UICollectionViewCell { ...@@ -263,7 +263,7 @@ open class CollectionViewCell: UICollectionViewCell {
*/ */
open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event) super.touchesBegan(touches, with: event)
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse)
} }
/** /**
...@@ -274,7 +274,7 @@ open class CollectionViewCell: UICollectionViewCell { ...@@ -274,7 +274,7 @@ open class CollectionViewCell: UICollectionViewCell {
*/ */
open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesEnded(touches, with: event) super.touchesEnded(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
/** /**
...@@ -285,7 +285,7 @@ open class CollectionViewCell: UICollectionViewCell { ...@@ -285,7 +285,7 @@ open class CollectionViewCell: UICollectionViewCell {
*/ */
open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesCancelled(touches, with: event) super.touchesCancelled(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
/** /**
......
...@@ -321,7 +321,7 @@ extension CALayer { ...@@ -321,7 +321,7 @@ extension CALayer {
} else if nil == shadowPath { } else if nil == shadowPath {
shadowPath = UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius).cgPath shadowPath = UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius).cgPath
} else { } else {
let a = Animation.shadowPath(to: UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius).cgPath) let a = Motion.shadowPath(to: UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius).cgPath)
a.fromValue = shadowPath a.fromValue = shadowPath
animate(animation: a) animate(animation: a)
} }
......
...@@ -57,11 +57,11 @@ public func AnimationFillModeToValue(mode: AnimationFillMode) -> String { ...@@ -57,11 +57,11 @@ public func AnimationFillModeToValue(mode: AnimationFillMode) -> String {
@objc(AnimationTimingFunction) @objc(AnimationTimingFunction)
public enum AnimationTimingFunction: Int { public enum AnimationTimingFunction: Int {
case `default`
case linear case linear
case easeIn case easeIn
case easeOut case easeOut
case easeInEaseOut case easeInEaseOut
case `default`
} }
/** /**
...@@ -86,7 +86,7 @@ public func AnimationTimingFunctionToValue(function: AnimationTimingFunction) -> ...@@ -86,7 +86,7 @@ public func AnimationTimingFunctionToValue(function: AnimationTimingFunction) ->
public typealias AnimationDelayCancelBlock = (Bool) -> Void public typealias AnimationDelayCancelBlock = (Bool) -> Void
public struct Animation { public struct Motion {
/** /**
Executes a block of code after a time delay. Executes a block of code after a time delay.
- Parameter duration: An animation duration time. - Parameter duration: An animation duration time.
...@@ -160,7 +160,7 @@ public struct Animation { ...@@ -160,7 +160,7 @@ public struct Animation {
- Returns: A CAAnimationGroup. - Returns: A CAAnimationGroup.
*/ */
public static func animate(group animations: [CAAnimation], duration: CFTimeInterval = 0.5) -> CAAnimationGroup { public static func animate(group animations: [CAAnimation], duration: CFTimeInterval = 0.5) -> CAAnimationGroup {
let group: CAAnimationGroup = CAAnimationGroup() let group = CAAnimationGroup()
group.fillMode = AnimationFillModeToValue(mode: .forwards) group.fillMode = AnimationFillModeToValue(mode: .forwards)
group.isRemovedOnCompletion = false group.isRemovedOnCompletion = false
group.animations = animations group.animations = animations
...@@ -183,3 +183,4 @@ public struct Animation { ...@@ -183,3 +183,4 @@ public struct Animation {
} }
} }
} }
...@@ -60,7 +60,7 @@ extension CABasicAnimation { ...@@ -60,7 +60,7 @@ extension CABasicAnimation {
} }
} }
extension Animation { extension Motion {
/** /**
Creates a CABasicAnimation for the backgroundColor key path. Creates a CABasicAnimation for the backgroundColor key path.
- Parameter color: A UIColor. - Parameter color: A UIColor.
......
...@@ -53,7 +53,7 @@ public func AnimationRotationModeToValue(mode: AnimationRotationMode) -> String? ...@@ -53,7 +53,7 @@ public func AnimationRotationModeToValue(mode: AnimationRotationMode) -> String?
} }
} }
extension Animation { extension Motion {
/** /**
Creates a CAKeyframeAnimation. Creates a CAKeyframeAnimation.
- Parameter bezierPath: A UIBezierPath. - Parameter bezierPath: A UIBezierPath.
......
...@@ -85,7 +85,7 @@ public func AnimationTransitionDirectionToValue(direction: AnimationTransitionDi ...@@ -85,7 +85,7 @@ public func AnimationTransitionDirectionToValue(direction: AnimationTransitionDi
} }
} }
extension Animation { extension Motion {
/** /**
Creates a CATransition animation. Creates a CATransition animation.
- Parameter type: An AnimationTransition. - Parameter type: An AnimationTransition.
......
...@@ -42,7 +42,7 @@ public enum PulseAnimation: Int { ...@@ -42,7 +42,7 @@ public enum PulseAnimation: Int {
case pointWithBacking case pointWithBacking
} }
internal extension Animation { internal extension Motion {
/** /**
Triggers the expanding animation. Triggers the expanding animation.
- Parameter layer: Container CALayer. - Parameter layer: Container CALayer.
...@@ -71,7 +71,7 @@ internal extension Animation { ...@@ -71,7 +71,7 @@ internal extension Animation {
visualLayer.masksToBounds = !(.centerRadialBeyondBounds == pulse.animation || .radialBeyondBounds == pulse.animation) visualLayer.masksToBounds = !(.centerRadialBeyondBounds == pulse.animation || .radialBeyondBounds == pulse.animation)
Animation.disable(animations: { [visualLayer = visualLayer, pulse = pulse] in Motion.disable(animations: { [visualLayer = visualLayer, pulse = pulse] in
bLayer.frame = visualLayer.bounds bLayer.frame = visualLayer.bounds
pLayer.bounds = CGRect(x: 0, y: 0, width: n, height: n) pLayer.bounds = CGRect(x: 0, y: 0, width: n, height: n)
...@@ -93,17 +93,17 @@ internal extension Animation { ...@@ -93,17 +93,17 @@ internal extension Animation {
switch pulse.animation { switch pulse.animation {
case .centerWithBacking, .backing, .pointWithBacking: case .centerWithBacking, .backing, .pointWithBacking:
bLayer.add(Animation.backgroundColor(color: pulse.color.withAlphaComponent(pulse.opacity / 2), duration: duration), forKey: nil) bLayer.add(Motion.backgroundColor(color: pulse.color.withAlphaComponent(pulse.opacity / 2), duration: duration), forKey: nil)
default:break default:break
} }
switch pulse.animation { switch pulse.animation {
case .center, .centerWithBacking, .centerRadialBeyondBounds, .radialBeyondBounds, .point, .pointWithBacking: case .center, .centerWithBacking, .centerRadialBeyondBounds, .radialBeyondBounds, .point, .pointWithBacking:
pLayer.add(Animation.scale(by: 1, duration: duration), forKey: nil) pLayer.add(Motion.scale(by: 1, duration: duration), forKey: nil)
default:break default:break
} }
Animation.delay(time: duration) { Motion.delay(time: duration) {
bLayer.setValue(true, forKey: "animated") bLayer.setValue(true, forKey: "animated")
} }
} }
...@@ -123,7 +123,7 @@ internal extension Animation { ...@@ -123,7 +123,7 @@ internal extension Animation {
return return
} }
Animation.delay(time: animated ? 0 : 0.15) { [pulse = pulse] in Motion.delay(time: animated ? 0 : 0.15) { [pulse = pulse] in
guard let pLayer = bLayer.sublayers?.first as? CAShapeLayer else { guard let pLayer = bLayer.sublayers?.first as? CAShapeLayer else {
return return
} }
...@@ -132,20 +132,20 @@ internal extension Animation { ...@@ -132,20 +132,20 @@ internal extension Animation {
switch pulse.animation { switch pulse.animation {
case .centerWithBacking, .backing, .pointWithBacking: case .centerWithBacking, .backing, .pointWithBacking:
bLayer.add(Animation.backgroundColor(color: pulse.color.withAlphaComponent(0), duration: duration), forKey: nil) bLayer.add(Motion.backgroundColor(color: pulse.color.withAlphaComponent(0), duration: duration), forKey: nil)
default:break default:break
} }
switch pulse.animation { switch pulse.animation {
case .center, .centerWithBacking, .centerRadialBeyondBounds, .radialBeyondBounds, .point, .pointWithBacking: case .center, .centerWithBacking, .centerRadialBeyondBounds, .radialBeyondBounds, .point, .pointWithBacking:
pLayer.add(Animation.animate(group: [ pLayer.add(Motion.animate(group: [
Animation.scale(by: .center == pulse.animation ? 1 : 1.325), Motion.scale(by: .center == pulse.animation ? 1 : 1.325),
Animation.backgroundColor(color: pulse.color.withAlphaComponent(0)) Motion.backgroundColor(color: pulse.color.withAlphaComponent(0))
], duration: duration), forKey: nil) ], duration: duration), forKey: nil)
default:break default:break
} }
Animation.delay(time: duration) { Motion.delay(time: duration) {
pLayer.removeFromSuperlayer() pLayer.removeFromSuperlayer()
bLayer.removeFromSuperlayer() bLayer.removeFromSuperlayer()
} }
......
...@@ -72,13 +72,13 @@ open class PulseView: View { ...@@ -72,13 +72,13 @@ open class PulseView: View {
from the center. from the center.
*/ */
open func pulse(point: CGPoint? = nil) { open func pulse(point: CGPoint? = nil) {
let p: CGPoint = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point! let p = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point!
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse)
Animation.delay(time: 0.35) { [weak self] in Motion.delay(time: 0.35) { [weak self] in
guard let s = self else { guard let s = self else {
return return
} }
Animation.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse) Motion.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse)
} }
} }
...@@ -90,7 +90,7 @@ open class PulseView: View { ...@@ -90,7 +90,7 @@ open class PulseView: View {
*/ */
open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event) super.touchesBegan(touches, with: event)
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse)
} }
/** /**
...@@ -101,7 +101,7 @@ open class PulseView: View { ...@@ -101,7 +101,7 @@ open class PulseView: View {
*/ */
open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesEnded(touches, with: event) super.touchesEnded(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
/** /**
...@@ -112,6 +112,6 @@ open class PulseView: View { ...@@ -112,6 +112,6 @@ open class PulseView: View {
*/ */
open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesCancelled(touches, with: event) super.touchesCancelled(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
} }
...@@ -108,7 +108,7 @@ open class SnackbarController: RootController { ...@@ -108,7 +108,7 @@ open class SnackbarController: RootController {
*/ */
@discardableResult @discardableResult
open func animate(snackbar status: SnackbarStatus, delay: TimeInterval = 0, animations: ((Snackbar) -> Void)? = nil, completion: ((Snackbar) -> Void)? = nil) -> AnimationDelayCancelBlock? { open func animate(snackbar status: SnackbarStatus, delay: TimeInterval = 0, animations: ((Snackbar) -> Void)? = nil, completion: ((Snackbar) -> Void)? = nil) -> AnimationDelayCancelBlock? {
return Animation.delay(time: delay) { [weak self, status = status, animations = animations, completion = completion] in return Motion.delay(time: delay) { [weak self, status = status, animations = animations, completion = completion] in
guard let s = self else { guard let s = self else {
return return
} }
......
...@@ -122,13 +122,13 @@ open class TableViewCell: UITableViewCell { ...@@ -122,13 +122,13 @@ open class TableViewCell: UITableViewCell {
from the center. from the center.
*/ */
open func pulse(point: CGPoint? = nil) { open func pulse(point: CGPoint? = nil) {
let p: CGPoint = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point! let p = nil == point ? CGPoint(x: CGFloat(width / 2), y: CGFloat(height / 2)) : point!
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: p, width: width, height: height, pulse: &pulse)
Animation.delay(time: 0.35) { [weak self] in Motion.delay(time: 0.35) { [weak self] in
guard let s = self else { guard let s = self else {
return return
} }
Animation.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse) Motion.pulseContractAnimation(layer: s.layer, visualLayer: s.visualLayer, pulse: &s.pulse)
} }
} }
...@@ -140,7 +140,7 @@ open class TableViewCell: UITableViewCell { ...@@ -140,7 +140,7 @@ open class TableViewCell: UITableViewCell {
*/ */
open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event) super.touchesBegan(touches, with: event)
Animation.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse) Motion.pulseExpandAnimation(layer: layer, visualLayer: visualLayer, point: layer.convert(touches.first!.location(in: self), from: layer), width: width, height: height, pulse: &pulse)
} }
/** /**
...@@ -151,7 +151,7 @@ open class TableViewCell: UITableViewCell { ...@@ -151,7 +151,7 @@ open class TableViewCell: UITableViewCell {
*/ */
open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesEnded(touches, with: event) super.touchesEnded(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
/** /**
...@@ -162,7 +162,7 @@ open class TableViewCell: UITableViewCell { ...@@ -162,7 +162,7 @@ open class TableViewCell: UITableViewCell {
*/ */
open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) { open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesCancelled(touches, with: event) super.touchesCancelled(touches, with: event)
Animation.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse) Motion.pulseContractAnimation(layer: layer, visualLayer: visualLayer, pulse: &pulse)
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment