[iOS] present Animation을 push Animation으로 변경

고재경·2024년 4월 22일
0
post-custom-banner

ViewController의 present Animation을 push Animation으로 변경

let transition = CATransition()
transition.type = .push
transition.duration = 0.25
transition.subtype = .fromRight
transition.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
self.view.window?.layer.add(transition, forKey: kCATransition)
self.present(viewController, animated: false)

ViewController의 dismiss Animation을 pop Animation으로 변경

let transition = CATransition()
transition.duration = 0.25
transition.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
transition.type = .push
transition.subtype = .fromLeft
self.view.window?.layer.add(transition, forKey: kCATransition)
self.dismiss(animated: false)
post-custom-banner

0개의 댓글