Commit 24dc7615 by Daniel Dahan

development: updated Motion framework and API internally in Material

parent 9b77130d
Subproject commit 61eb033d2629a1a65bc5a8123bc3cbd527387eb2 Subproject commit 67550d30d5162f59d958c6866e99a91bab158197
...@@ -285,7 +285,7 @@ extension CALayer { ...@@ -285,7 +285,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 {
motion(.shadowPath(UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius).cgPath)) animate(.shadowPath(UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius).cgPath))
} }
} }
} }
...@@ -149,13 +149,13 @@ public struct Pulse { ...@@ -149,13 +149,13 @@ public struct Pulse {
switch animation { switch animation {
case .centerWithBacking, .backing, .pointWithBacking: case .centerWithBacking, .backing, .pointWithBacking:
bLayer.motion(.backgroundColor(color.withAlphaComponent(opacity / 2)), .duration(duration)) bLayer.animate(.backgroundColor(color.withAlphaComponent(opacity / 2)), .duration(duration))
default:break default:break
} }
switch animation { switch animation {
case .center, .centerWithBacking, .centerRadialBeyondBounds, .radialBeyondBounds, .point, .pointWithBacking: case .center, .centerWithBacking, .centerRadialBeyondBounds, .radialBeyondBounds, .point, .pointWithBacking:
pLayer.motion(.scale(1), .duration(duration)) pLayer.animate(.scale(1), .duration(duration))
default:break default:break
} }
...@@ -183,13 +183,13 @@ public struct Pulse { ...@@ -183,13 +183,13 @@ public struct Pulse {
switch animation { switch animation {
case .centerWithBacking, .backing, .pointWithBacking: case .centerWithBacking, .backing, .pointWithBacking:
bLayer.motion(.backgroundColor(color.withAlphaComponent(0)), .duration(duration)) bLayer.animate(.backgroundColor(color.withAlphaComponent(0)), .duration(duration))
default:break default:break
} }
switch animation { switch animation {
case .center, .centerWithBacking, .centerRadialBeyondBounds, .radialBeyondBounds, .point, .pointWithBacking: case .center, .centerWithBacking, .centerRadialBeyondBounds, .radialBeyondBounds, .point, .pointWithBacking:
pLayer.motion(.scale(.center == animation ? 1 : 1.325), .backgroundColor(color.withAlphaComponent(0))) pLayer.animate(.scale(.center == animation ? 1 : 1.325), .backgroundColor(color.withAlphaComponent(0)))
default:break default:break
} }
......
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