modally : 뷰 위에 뷰가 한겹 올라간 구조
세로방향으로 전개(아래에서 위)
사용하는곳 : alert 알람, 새로운 이메일 작성하기
modalPresentationStyle로 화면 전환이 되는 스타일을 정할 수 있음
let 이동할뷰컨 = self.storyboard?.instantiateViewController(withIdentifier: "뷰컨아이디") else {return}
self.present(이동할뷰컨, animated: true, completion: nil)
viewControllerPresent : 현재의 뷰컨 내용 위에 보여지는 뷰컨
flag : 애니메이션 여부
completion : 이동이 끝난 후 실행될 블록 =nil (리턴값, 파라미터 없음)
이동할뷰컨.modalPresentationStyle = .fullScreen
뷰컨을 네비게이션으로 부터 pop하고 화면 업데이트
self.presentingViewController?.dismiss(animated: true)
animated : 애니메이션 여부
새로운 View Controller 만들기 New File > Cocoa Touch class > UIViewController > Class에 본인이 원하는 폴더 명
code에서 let mainViewController로 MainView를 호출
fullscreen을 줘서 전체 화면을 채우게 함