2012-08-17 3 views
-6

가능한 복제를 탐색 표시 줄을 추가
Tab Bar Application With Navigation ControllerTabBar의 응용 프로그램에

내 엑스 코드의 버전은 4.3.2이다. Tabbar 기반 응용 프로그램에 탐색 모음을 추가하고 싶습니다.

감사합니다.

+0

UINavigationBar의 * 표시 줄에있는 하위 뷰로 UINavigationBar을 추가 할 수 있습니다; bar.topItem.title = @ "처음"; – Rushabh

+0

self.navigationController.navigationItem.title = @ "처음"; 하지만 둘 다 작동하지 않습니다. – Rushabh

+1

내 은행 번호는 XXXCCCYYYZZZ입니다. 백만 달러를 추가하겠습니다. 감사합니다. . –

답변

4

예를 들어, 스토리 보드를 사용하여 만들 수 있습니다. 당신의 applicationDidFinishLaunching 방법에서

ss

4

당신은

UINavigationController *firstNavController = [[UINavigationController alloc] initWithRootViewController:firstViewController]; 
. 
. 
. 
//And in the tabbarController array add the navigationController Object instaed if FirstViewControllerObject 
self.tabBarController.viewControllers = [NSArray arrayWithObjects:firstNavController, secondViewController, nil]; 

그리고 그 다 다음과 같이 FirstViewController 객체 UINavigationController의 객체를 추가

FirstViewController *firstViewController = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil]; 
. 
. 
. 

self.tabBarController = [[UITabBarController alloc] init]; 
self.tabBarController.viewControllers = [NSArray arrayWithObjects:firstViewController, secondViewController, nil]; 

같은 것을 볼 수 있습니다. 이제 FirstViewController은 navigationController로 취급되며 탐색 표시 줄을 갖습니다. 당신은 그때 탐색 모음을 원하는 경우에

편집

당신은 xib에서 삽입 또는 self.view

+1

고맙습니다. S P Varma. – Rushabh