Skip to content

Instantly share code, notes, and snippets.

@sgl0v
Created June 21, 2020 15:44
Show Gist options
  • Save sgl0v/f5885c6c54eadd1155bea250bf41456b to your computer and use it in GitHub Desktop.
Save sgl0v/f5885c6c54eadd1155bea250bf41456b to your computer and use it in GitHub Desktop.
private func updateInteractiveTransition(distanceTraveled: CGFloat) {
var fraction = distanceTraveled / totalAnimationDistance
if state == .open { fraction *= -1 }
runningAnimators.fractionComplete = fraction
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment