mirror of
https://github.com/dirtydishes/dreamio.git
synced 2026-06-06 13:37:24 +00:00
Fade player controls without movement
This commit is contained in:
parent
30cfc95fa2
commit
6ced219906
2 changed files with 32 additions and 8 deletions
|
|
@ -733,16 +733,10 @@ final class NativePlayerViewController: UIViewController {
|
|||
private func revealControls() {
|
||||
controlsContainer.isUserInteractionEnabled = true
|
||||
closeButton.isUserInteractionEnabled = true
|
||||
let animations = {
|
||||
controlsContainer.transform = .identity
|
||||
UIView.animate(withDuration: 0.22, delay: 0, options: [.curveEaseOut]) {
|
||||
self.controlsContainer.alpha = 1
|
||||
self.closeButton.alpha = 1
|
||||
self.controlsContainer.transform = .identity
|
||||
}
|
||||
if UIAccessibility.isReduceMotionEnabled {
|
||||
animations()
|
||||
} else {
|
||||
controlsContainer.transform = CGAffineTransform(translationX: 0, y: 8).scaledBy(x: 0.98, y: 0.98)
|
||||
UIView.animate(withDuration: 0.22, delay: 0, options: [.curveEaseOut], animations: animations)
|
||||
}
|
||||
scheduleControlsHide()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue