2012-08-28 6 views
4

나는 네비게이션 컨트롤러를 포함하는 초기 루트 뷰 컨트롤러를 사용하고 있습니다 : UIViewController에하는TabBarController +있는 navigationController : 푸시 팝 문제

enter image description here

지금 내가있는 UIViewController 1.2.1에서 탐색 할 1.1

self.pushview 및 self.popView 함수와 같은 모든 기존 솔루션은 작동하지 않습니다. 그들은 페이지를 포함하는 것을 UITabBarController가의 다른 인스턴스를 만들 ... Plz은들 당신은 네비게이션 컨트롤러에 약간의 놀람을 넣어야 할

답변

7

......... 어떤 도움을 이해할 수있을 것이다 .. 손을 가입 부모 탐색 컨트롤러를 사용

self.tabBarController.navigationController

사용자가이 코드에 대한 탐색 자기 탐색 컨트롤러에 대한 계층 구조

PUSH : [self.tabBarController.navigationController pushViewController:objNav animated:YES]; 

POP : [self.tabBarController.navigationController popViewControllerAnimated:YES]; 

감사합니다, 스위프트 3.0

+0

이 너무 오래 나를 찾을 수까지했다, 감사;) – Morkrom

+0

멋진 답변 tqs 젠장 내 시간을 많이 구해 –

0

PUSH :

self.tabBarController?.navigationController?.pushViewController(ViewControleer, animated: true) 
self.tabBarController?.show(ViewControleer, sender: self) 

POP :

self.tabBarController?.navigationController?.popToRootViewController(animated: true) 
self.tabBarController?.navigationController?.popViewController(animated: true) 
self.tabBarController?.navigationController?.popToViewController(ViewControleer, animated: true) 
관련 문제