From 7b6b3fa925553249d826a9e68e6091088c783033 Mon Sep 17 00:00:00 2001 From: Subin Yang Date: Sun, 8 Jan 2023 16:52:22 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20#94=20-=20dimmerView=20animation=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/ListDetailScene/VC/ListDetailVC.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SOPT-Stamp-iOS/Projects/Presentation/Sources/ListDetailScene/VC/ListDetailVC.swift b/SOPT-Stamp-iOS/Projects/Presentation/Sources/ListDetailScene/VC/ListDetailVC.swift index d3572735..86b44fd0 100644 --- a/SOPT-Stamp-iOS/Projects/Presentation/Sources/ListDetailScene/VC/ListDetailVC.swift +++ b/SOPT-Stamp-iOS/Projects/Presentation/Sources/ListDetailScene/VC/ListDetailVC.swift @@ -282,7 +282,9 @@ extension ListDetailVC { private func presentCompletedVC(level: StarViewLevel) { let missionCompletedVC = factory.makeMissionCompletedVC(starLevel: level) missionCompletedVC.completionHandler = { - UIView.animate(withDuration: 0.2, delay: 0) { + UIView.animate(withDuration: 0.2, delay: 0, animations: { + self.backgroundDimmerView.alpha = 0 + }) { _ in self.backgroundDimmerView.removeFromSuperview() } } @@ -290,11 +292,17 @@ extension ListDetailVC { } private func showDimmerView() { + self.backgroundDimmerView.alpha = 0 + self.view.addSubview(backgroundDimmerView) backgroundDimmerView.snp.makeConstraints { make in make.edges.greaterThanOrEqualToSuperview() } + + UIView.animate(withDuration: 0.2, delay: 0) { + self.backgroundDimmerView.alpha = 1 + } } // MARK: - @objc