Skip to content

Instantly share code, notes, and snippets.

@sgl0v
Created June 21, 2020 15:46
Show Gist options
  • Save sgl0v/e4c70e513d6403a362b8a9242ccc5203 to your computer and use it in GitHub Desktop.
Save sgl0v/e4c70e513d6403a362b8a9242ccc5203 to your computer and use it in GitHub Desktop.
private func createTransitionAnimators(with duration: TimeInterval) -> [UIViewPropertyAnimator] {
switch state {
case .open:
return [
openPlayerAnimator(with: duration),
fadeInPlayerAnimator(with: duration),
fadeOutMiniPlayerAnimator(with: duration)
]
case .closed:
return [
closePlayerAnimator(with: duration),
fadeOutPlayerAnimator(with: duration),
fadeInMiniPlayerAnimator(with: duration)
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment