1
내 iPhone 응용 프로그램에서 TabBar를 사용하여 프로그래밍 방식으로 통합했습니다. 필자는 TabBarItem을 여러 개 가지고 있으며, 모든 클릭은 해당 XYZ-View.xib와 함께 XYZ-ViewController를로드합니다. http://developer.apple.com/iphone/library/samplecode/TableSearch/index.html내비게이션 막대/검색 막대 및 표보기와 결합 된 TabBar
그러나이 예에서는 가하는 TabBar의가없는 소스를 복사
는 지금은 TabBar의와 화면 SearchBar에있는 Navbar의 애플의 예에서와 같은 세그먼트 제어를 할 때 사용 내 프로젝트는 내가 XViewController.m의 viewDidLoad 방법에 로딩을했다는 것을, 문제를 일으키는로 :
// Add create and configure the navigation controller.
MyAppDelegate *myAppDelegate = [[UIApplication sharedApplication] delegate];
// Add create and configure the navigation controller.
UINavigationController * navigationController = [[UINavigationControlleralloc] initWithRootViewController:self];
myAppDelegate.navController = navigationController;
[navigationController release];
[myAppDelegate.window addSubview:myAppDelegate.navController.view];
효과가 올바른 제목의 도구 모음이 있다는 것을,하지만 어떤 검색 창없이 TabBar의가에 없다 바닥.
아무도 나에게 힌트를 줄 수 있습니까?
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:test2ViewController];
NSArray* controllers = [NSArray arrayWithObjects:test1ViewController, navigationController, test3ViewController, nil];
[self.myTabBarController setViewControllers:controllers];
검색 창이 : – Tim