여기에서 매우 흥미로운 문제가 있습니다. 내 iPhone 앱에는 AppDelegate에서 rootViewController로 UITabbarController가 있습니다.UITabbarController 모달 UINavigationController 닫기
앱을 처음 열면 기본적으로 구성되어야합니다. 이를 위해 나는은 UINavigationController를 만들고 모달을 제시하기 위해 tabbarController 알려주기 :
firstRun = [[firstRunViewController alloc] init];
navCtrl = [[UINavigationController alloc] initWithRootViewController:firstRun];
[[self tabBarController] presentModalViewController:navCtrl animated:NO];
구성이 완료되면, 나는 firstRunViewController 제거하고 싶습니다. 이 기술을 매우 자주 사용하고 있는데 -dismissModalViewControllerAnimated:
을 사용하고 있습니다.
하지만이 별자리에서는 작동하지 않습니다. 내가 멸망이라고 부르는 컨트롤러는 중요하지 않습니다. tabbarController, rootViewController, 현재 활성화 된 viewController를 통해 자체 및 다른 여러 컨트롤러를 시도했습니다.
'UIViewControllerHierarchyInconsistency', reason: 'presentedViewController for controller is itself on dismiss for: <UINavigationController:…
아무도 도와 드릴까요 :
내가 -dismissModalViewControllerAnimated:
를 호출 할 때마다 나는이 예외가? 종류 안부 사전에 감사합니다, 줄리안
내가 메인 윈도우에 대한 rootViewController로 UITabBarController가 사용하고 내 AppDelegate에에서 편집 :
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
그럼 내가 UINavigationController가를 생성하고 말거야 지금 -dismissModalViewControllerAnimated를 호출 할 때
UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:firstRun];
[[self tabBarController] presentModalViewController:navCtrl animated:NO];
이 : 다음 firstViewController에 내가 오류 FR 받고 있어요 UITabBarController가이 modalViewController을 제시 위의 옴.
이런 종류의 작품 ...하지만 애니메이션을 적용 할 수 없습니다. 마지막 모달 viewController에 [UIView animateWithDuratio :]를 추가하려고했습니다. 그러나 애니메이션은 나타나지 않습니다. –
정말 문제가 무엇인지 이해하고 싶습니다. 내가하는 것처럼 modalViewController (daily business)를 보여주기 때문에 login-viewController를 보여줄 것이다. 문제는 하나의 인스턴스가 더 있다고 생각합니다. navigationController ... –