프로그래밍 방식으로 프로그램에 탭 표시 줄 컨트롤러가 포함되어 있지만 내 스토리 보드 내장 표시 줄이 사라져 버린 것 같습니다. rootviewController
이 내 탭 바입니다. 이 문제가 너무 아래 Pushing a navigation controller is not supported
스위프트 : 프로그래밍 방식으로 탭 표시 줄 컨트롤러를 포함시킨 후 탐색 표시 줄이 사라짐
내 코드는 AppDelegate에 작성되는 오류와 나 메시지를 표시하지만하고, 유사 보였다으로
내가 answer to this post를 읽고 여기 내 탭보기 및 탐색 컨트롤러를 생성 루트보기 컨트롤러로 푸시 :// Set up the tab and navigation bar controllers
var currController = window?.rootViewController
let chatSB = UIStoryboard(name: "Chat", bundle: nil)
let mainSB = UIStoryboard(name: "Main", bundle: nil)
let tabBarController = UITabBarController()
var navigationController = UINavigationController(rootViewController: currController!)
let profileVC = mainSB.instantiateViewControllerWithIdentifier("profileVC") as TimelineTableViewController
let chatVC = chatSB.instantiateViewControllerWithIdentifier("chatInboxVC") as ChatInboxViewController
tabBarController.viewControllers = [profileVC, chatVC, navigationController]
window?.rootViewController = tabBarController
어떻게이 문제를 해결할 수 있습니까?
는 탭의 탐색 컨트롤러 "외부"아니면 당신에게 벤처 캐피탈을 - 당신이 탐색 컨트롤러 장면은 자신의 식별자로 "profileNavController"와 "chatInboxNavController"이 경우
그래서, 당신의 코드가 될 것이다 탭에 탐색 컨트롤러가 있습니까? – Paulw11
내비게이션 컨트롤러는 내부적입니다. 예를 들어, 프로필과 채팅은 각각 스토리 보드에 자체 내비게이션 스택을 가지고 있습니다. – Alex
그런 다음 'TimelineTableViewController'및 'ChatInboxViewController'VC를 인스턴스화하는 대신 내장되어있는 UINavigationController를 인스턴스화하여 탭 표시 줄 컨트롤러에 추가해야합니다. 스토리 보드는 타임 라인을 인스턴스화하고 내비게이션 컨트롤러에 포함 된 VC를 채팅합니다. – Paulw11