📑 학습 내용
- 화면 전환을 모달 방식으로 여러번 한 후, 한 번에 dismiss 하는 방법
- presentingViewController : 현재 뷰를 띄운 뷰 컨트롤러
self.presentingViewController?.presentingViewController?.dismiss(animated: true)
→ presentingViewController 를 여러번 사용하여 이전 뷰 컨트롤러를 사용 가능함
📚 참고 자료
- https://developer.apple.com/documentation/uikit/uiviewcontroller/1621430-presentingviewcontroller
- https://velog.io/@hyesuuou/SwiftiOS-modal-2개-한번에-dismiss하기
[Swift/iOS] modal 2개 한번에 dismiss하기
이렇게 한번에 모달창 두개를 dismiss 하는 방법은로 구현할 수 있습니다~참고https://stackoverflow.com/questions/54266115/how-to-dismiss-2-modal-view-controllers-without-weird-a
velog.io
presentingViewController | Apple Developer Documentation
The view controller that presented this view controller.
developer.apple.com
'Swift' 카테고리의 다른 글
Swift - UICollectionViewFlowLayout 셀 크기 다르게 구현 (UILabel) (0) | 2024.12.02 |
---|---|
Swift - KeyChain이란? (0) | 2024.11.24 |
Swift - 카카오 로그인 사용자 정보 가져오기 (1) | 2024.11.20 |
Swift - Configuration Settings File(.xcconfig 파일)을 이용한 git에 API Key 숨기기 (1) | 2024.11.16 |
Swift - 카카오 로그인 오류(웹 관리자 설정 오류, KOE101) 해결 (0) | 2024.11.16 |