Swift: 다른 계층의 ViewController 가져오기
parent (이전 parentViewController)
현재 계층의 부모 VC(예: Navigation Controller)를 받습니다.
모드를 표시할 때
모드 디스플레이
present(_:animated:completion:)
는 이전의 등급 구조와 다른 등급에서 발생한 화면 이동이다.따라서 parent
과거 VC를 취득할 수 없다.예를 들어 다음과 같은 화면이 겹친다
A: ViewController
B: NewModalViewController //A.present(_:animated:completion:)
presentingViewController
B한테 본 A.자신의 VCC를 제시합니다.
presentedViewController
A에서 B를 보다.자기가 제시하는 VC.
기억 방법
영어 복습.이presenting과presented는 현재 진행계와 과거식이 아니라 b동사와 함께 사용하는 형용사다.
"물건이나 타인이 자신을 속이고 있다."
The soccer game is exciting (to me).
자기
I am excited at the soccer game.
https://global-square.com/blog/exciting-excited/
발전시키다
그러나 Navigation Controller 등이 push, push로 변환된 후 present Modally를 진행할 때는 다소 복잡할 것으로 보인다.
A: TabBarController
B: NavigationController //A.addChild(B)
C: FirstNavChildViewController //B.pushViewController(_:animated:)
D: NewModalViewController //C.present(_:animated:completion:)
라벨 변환과 추측 변환은present Modally에 적합하지 않을 것입니다.지금은 시간이 없으니 잠시 후에 검증한 후에 다시 기입합시다.자세한 사람 있으면 m()라고 대답해 주세요.mA.presentedVC = D?
B.presentingVC = ?
B.presentedVC = ?
C.presentingVC = ?
C.presentedVC = ?
D.preesntingVC = A?
present와modal의 언어적 의미
present
선물로 프레젠트지만 화면이 바뀌는 의미에선'힌트'가 가장 적합하다.
Modal
Mode(모드, 스타일, 형식)의 형용사.직역은'양식적'등의 뜻으로 위에서 덮여 있다는 뜻이 아니다.'현재 모드에서 벗어나 다른 모드를 시작합니다. (그 전에 원시 모드의 조작을 하지 않습니다.)' 라는 뜻이다.
모드 대화상자는 주요 내용에 표시된 대화상자에서 사용자의 상호작용을 요청하는 특수한 모드로 시스템을 옮깁니다.이 대화상자는 사용자가 이 모드 대화상자와 명확하게 상호작용할 때까지 주요 내용을 비활성화합니다.
https://u-site.jp/alertbox/modal-nonmodal-dialog
Reference
이 문제에 관하여(Swift: 다른 계층의 ViewController 가져오기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://zenn.dev/maztak/articles/ffbf2e6892e90e텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)