Skip to content

Commit

Permalink
💫 :: [#1238] 음악 재생 타입 Animation Spec 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
baekteun committed Aug 26, 2024
1 parent b3d43f5 commit 38d25b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,18 @@ public final class PlayTypeTogglePopupViewController: UIViewController {
override public func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

contentView.transform = CGAffineTransform(translationX: 0, y: self.view.frame.height)
UIView.animate(withDuration: 0.3, delay: 0, options: .curveEaseInOut, animations: {
contentView.transform = CGAffineTransform(translationX: 0, y: 80)
contentView.alpha = 0
dimmView.alpha = 0
let animator = UIViewPropertyAnimator(duration: 0.3, curve: .easeInOut)
animator.addAnimations {
self.contentView.transform = CGAffineTransform.identity
}, completion: nil)
}
animator.addAnimations {
self.contentView.alpha = 1
self.dimmView.alpha = 1
}
animator.startAnimation()
}

func setActions() {
Expand Down Expand Up @@ -251,19 +259,7 @@ private extension PlayTypeTogglePopupViewController {
}

func dismiss() {
UIView.animate(
withDuration: 0.3,
delay: 0,
options: .curveEaseInOut,
animations: { [weak self] in
guard let self = self else { return }
let translationY = self.view.frame.height
self.contentView.transform = CGAffineTransform(translationX: 0, y: translationY)
},
completion: { [weak self] _ in
self?.dismiss(animated: false)
}
)
self.dismiss(animated: false)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ extension SettingViewController: UITableViewDelegate {
cancelCompletion: {}
)
togglePopupVC.modalPresentationStyle = .overFullScreen
togglePopupVC.modalTransitionStyle = .crossDissolve
self.present(togglePopupVC, animated: false)
}

Expand Down

0 comments on commit 38d25b4

Please sign in to comment.