두 개 이상의 UINavigationControlller
관리에 문제가 있습니다.하나 이상의 UINavigationController 및 하나의 UITabBarController 사용
저는 UITabBar
이며 모든 탭에는 별도의 UINavigationController
이 있습니다. 그래서
tabBar.selectedIndex = i; // where i is index of tabbar.
에 의해 UITabBar
으로 전환하고 내가
tabBar.selectedIndex = previousIndex;
에 의해 다시 이전 탭으로 갈 때 나는 UINavigationController
의 루트가 아니라 내가 이전에 왼쪽의 ViewController로 이동합니다.
-viewDidLoad:
또는 -viewWillAppear:
을 호출하지 않고도 다른 탭으로 이동하는 viewcontroller로 이동하려고합니다.
UINavigationController
또는 내 viewController 중 하나를 나타내는 방법이 필요합니다. 유
- (BOOL)tabBarController:(UITabBarController *)tbc shouldSelectViewController:(UIViewController *)viewController {
}
이 tabbarcontroller의 delagate로 AppDelegate에 클래스에 지정 탭을 전환하려고 할 때마다
우리가 rootView를 보여주기 위해 변경하지 않는 한 이것은 UITabBar의 기본 기능입니다. u는 tabBarDelegate에서 rootView를 표시하기 위해 몇 가지 사항을 쓸 수 있습니다 .. – vishy
당신은 usi입니까? [this] (https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTabViewDelegate_Protocol/Reference/Reference.html)의 tabbarDelegate 메소드 중 하나를 클릭 한 다음 –
코드를 공유하십시오. 내 tabbardelegate 확인. @vishy – user1667626