Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Commit

Permalink
Also slow down the beginTime for tweens when simulator slow motion is…
Browse files Browse the repository at this point in the history
… enabled.

Reviewers: O2 Material Motion, O4 Material Apple platform reviewers, #material_motion, markwei

Reviewed By: O2 Material Motion, O4 Material Apple platform reviewers, #material_motion, markwei

Tags: #material_motion

Differential Revision: http://codereview.cc/D3219
  • Loading branch information
Jeff Verkoeyen committed May 12, 2017
1 parent b3908da commit fa28ef9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/reactivetypes/Reactive+CALayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ extension Reactive where O: CALayer {
let animation = info.animation.copy() as! CAPropertyAnimation

animation.duration *= TimeInterval(simulatorDragCoefficient())
animation.beginTime *= TimeInterval(simulatorDragCoefficient())

if layer.speed == 0, let lastTimelineState = layer.lastTimelineState {
animation.beginTime = TimeInterval(lastTimelineState.beginTime) + animation.beginTime
Expand Down

0 comments on commit fa28ef9

Please sign in to comment.