Skip to content

Commit

Permalink
[Fix] sopt-makers#94 - dimmerView animation 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yangsubinn committed Jan 8, 2023
1 parent dcba138 commit 7b6b3fa
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,27 @@ 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()
}
}
self.present(missionCompletedVC, animated: true)
}

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
Expand Down

0 comments on commit 7b6b3fa

Please sign in to comment.