2010-04-04 3 views
1

그래서 내 앱이 UIViewController (탭바를 보지 않고)로 시작한 다음 탐색 바 및 탭바가있는 UITableView를 입력하고 싶습니다. 문제는 그 Tabbar가 응용 프로그램에서 시작 표시됩니다, 아무도이 매우 도움이 될 것입니다 도울 수있다 ...앱 시작시 탭바를 숨기는 방법은 무엇입니까?

답변

0

나는 당신이 중 하나를 보내야한다고 생각합니다 - presentModalViewController : animated : 메인 UIViewController 탭 막대 컨트롤러 이렇게 인수로하거나 :

[myWindow addSubview: myTabBarController.view]; 
0

앱 네비게이션 기반 응용 프로그램 (이 아니라 하나를 기반으로 탭 표시 줄) 다음 jQuery과에 탭 표시 줄을 추가합니다.

의 UITabBar here

이 같은 그것을 할를 추가하기위한 도움이 :이 발견합니다 (Locati 응용 프로그램에서) 테이블보기 및지도보기

tabBarController = [[UITabBarController alloc] init];   // creates your tab bar so you can add everything else to it 

searchTableViewController = [[SearchTableViewController alloc] init];    // creates your table view - this should be a UIViewController with a table view in it, or UITableViewController 
UINavigationController *searchTableNavController = [[[UINavigationController alloc] initWithRootViewController:searchTableViewController] autorelease]; 
[searchTableViewController release];                // creates your table view's navigation controller, then adds the view controller you made. Note I then let go of the view controller as the navigation controller now holds onto it 

searchMapViewController = [[SearchMapViewController alloc] init]; 
UINavigationController *mapTableNavController = [[[UINavigationController alloc] initWithRootViewController:searchMapViewController] autorelease]; 
[searchMapViewController release];             // does exactly the same as the first round, but for your second tab at the bottom of the bar. 

tabBarController.viewControllers = [NSArray arrayWithObjects:searchTableNavController, mapTableNavController, nil]; //add both of your navigation controllers to the tab bar. You can put as many controllers on as you like 

그리기이 경우는 오래 전에 패턴. 미안하다. 나는 원래를 지적 할 수 없다. 그런 다음 관련 뷰 ([... view addSubView : tabBarController];)에 tabbarcontoller를 추가하여 프레임을 먼저 설정해야합니다.

+0

예 내 응용 프로그램은 탐색 기반 응용 프로그램이며, mainwindow는 Tabbar 및 탐색 모음으로 UITableView를 호출합니다. 그 이유는 Tabbar가 시작보기 (UIViewController)에 표시되는 이유입니다. 어떤 샘플 코드를 게시 할 수 있다면 고맙겠습니다. – Georg

+0

내 응용 프로그램은 TabBar 기반 응용 프로그램입니다.이 문제는 Tabbar 컨트롤러가 보이지 않는 UIView를로드하는 데 문제가 있습니까 ?? – Georg

+0

예. 보기 기반 앱을 만듭니다. 탭 표시 줄을 원하는 화면에 탭 표시 줄을 추가하십시오. – Andiih

관련 문제