반응형
- custom modal transition style의 경우 animator 객체 외에 해당 객체를 사용할 수 있음
- view controller가 presenting 되기 전에 UIPresentationController의 시스템이 presentation controller을 생성하며 view controller가 dismiss 되기 전까지 참ㅈ도를 유지하게 됨
- presentation controller는 animator object의 수명 주기를 넘어서도 존재할 수 있기 때문에 presentation controller를 사용함
- 만약 커스텀 트랜지션 중에 화면에 나타나는 view controller의 뒷 부분에 그림자가 나타나야 한다면 presentation controlelr는 shadow뷰를 생성하고 보여준 다음 적절한 타이밍에 그것을 숨길 수 있음
func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
return PresentationController(presentedViewController: presented, presenting: presenting)
}
UIViewControllerTransitioningDelegate를 따르는 객체의 메소드에서 위와 같이 사용될 수 있음
728x90
반응형
'🍎 iOS' 카테고리의 다른 글
[iOS/Swift] infoDictionary 앱 버전, 번들 아이디 가져오기 (0) | 2023.02.04 |
---|---|
[iOS/Swift] 싱글톤 객체 생성 Singleton (0) | 2023.02.04 |
[iOS/Swift] UIViewControllerTransitioningDelegate (0) | 2023.01.29 |
[iOS/Swift] UIViewControllerAnimatedTransitioning 정리 (0) | 2023.01.29 |
[Pod/iOS] Pod 라이브러리 생성하고 관리하기 (0) | 2023.01.29 |
댓글