From accb9de660e125afefe7ec3d1def25fbe63f50be Mon Sep 17 00:00:00 2001 From: aforge Date: Fri, 17 Feb 2023 14:49:03 -0800 Subject: [PATCH] Fade pause button in video preview player. --- Tinodios/VideoPreviewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tinodios/VideoPreviewController.swift b/Tinodios/VideoPreviewController.swift index a2fdb1d3..bfd9eb9d 100644 --- a/Tinodios/VideoPreviewController.swift +++ b/Tinodios/VideoPreviewController.swift @@ -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) {