Commit d21da35d by Daniel Dahan

reworked MotionContext

parent aa31695e
...@@ -297,7 +297,7 @@ public extension MotionController { ...@@ -297,7 +297,7 @@ public extension MotionController {
} }
let s = MotionTargetState(transitions: transitions) let s = MotionTargetState(transitions: transitions)
let v = context.pairedView(for: view) ?? view let v = context.transitionPairedView(for: view) ?? view
for a in animators { for a in animators {
a.apply(state: s, to: v) a.apply(state: s, to: v)
......
...@@ -94,9 +94,9 @@ class CascadePreprocessor: BasePreprocessor { ...@@ -94,9 +94,9 @@ class CascadePreprocessor: BasePreprocessor {
let delay = TimeInterval(i) * deltaTime + initialDelay let delay = TimeInterval(i) * deltaTime + initialDelay
func applyDelay(view: UIView) { func applyDelay(view: UIView) {
if context.pairedView(for: view) == nil { if context.transitionPairedView(for: view) == nil {
context[view]?.delay = delay context[view]?.delay = delay
} else if delayMatchedViews, let paired = context.pairedView(for: view) { } else if delayMatchedViews, let paired = context.transitionPairedView(for: view) {
context[view]?.delay = finalDelay context[view]?.delay = finalDelay
context[paired]?.delay = finalDelay context[paired]?.delay = finalDelay
} }
......
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