Skip to content

Commit

Permalink
Fade pause button in video preview player.
Browse files Browse the repository at this point in the history
  • Loading branch information
aforge committed Feb 17, 2023
1 parent 515ba4c commit accb9de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tinodios/VideoPreviewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ class VideoPreviewController: UIViewController {
let im = UIImage(systemName: isPlaying ? "pause.fill" : "play.fill",
withConfiguration: UIImage.SymbolConfiguration(pointSize: 70, weight: .regular, scale: .large))
playPauseButton.setImage(im, for: .normal)
if isPlaying {
UIView.animate(withDuration: 1) {
self.playPauseButton.alpha = 0.2
}
} else {
self.playPauseButton.alpha = 1
}
}

@IBAction func playPauseClicked(_ sender: Any) {
Expand Down

0 comments on commit accb9de

Please # to comment.