NavigationController를 스토리 보드로 추가
Editor > Embed In > Navigation Controller


오른쪽의 ViewController로 NavigationItem을 드래그 앤 드롭하면 NavigationBar에 Title이 추가됩니다.

추가, 취소 버튼 등을 추가하고 싶을 때는 BarButtonItem을 NavigationBar의 좌우로 드래그 앤 드롭하면 추가됩니다.
BarButtonItem 선택 > 야구 홈베이스 아이콘 > BarButtonItem > SystemItem
로 버튼 종류를 선택할 수 있습니다.

참고로 BarButtonItem을 전환 대상의 ViewController와 연결하면 전환 대상의 NavigatoinBar로 돌아가기 버튼을 두지 않고 자동으로 이전 화면으로 돌아가는 버튼을 생성합니다.
또 다른 방법
NavigationController 드래그 앤 드롭

NavigationController와 함께 마음대로 추가된 TableView를 삭제.
(아래 이미지에서 중앙 ViewController)

NavigationController에서 control을 누른 상태에서 (또는 마우스 오른쪽 버튼을 누른 채) ViewController로 드래그합니다.

루트 뷰 컨트롤러를 선택하여 ViewController를 화면 전환의 루트로 설정합니다.
이 방법으로 자동으로 Title과 BarButtonItem이 추가됩니다.
Reference
이 문제에 관하여(NavigationController를 스토리 보드로 추가), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/NatsumiShimamoto/items/93ea8b3e49b894e43232텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)