Closed jverkoey closed 7 years ago
TweenPerformer allows Tweens to be registered to UIView and CALayer. In actuality, Tweens can only be added to CALayer.
This flexibility can cause problems due to how performers are instantiated. Consider the following example:
let tween = Tween(...) runtime.addPlan(tween, view) runtime.addPlan(tween, view.layer)
The tween will get added to view.layer twice, but through two different performers.
view.layer
Our performers need to be more strict about what sorts of targets they accept. In this case our performers should only accept CALayer targets.
🎊 My diff is ready for review at http://codereview.cc/D1929
TweenPerformer allows Tweens to be registered to UIView and CALayer. In actuality, Tweens can only be added to CALayer.
This flexibility can cause problems due to how performers are instantiated. Consider the following example:
The tween will get added to
view.layer
twice, but through two different performers.Our performers need to be more strict about what sorts of targets they accept. In this case our performers should only accept CALayer targets.