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

고재경·2024년 4월 22일
0

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)

0개의 댓글