请检查以下代码。我需要一起实现tabbar和facebook幻灯片菜单。
tabBarController.delegate = self;
self.leftController = [[LeftViewController alloc] initWithNibName:@"LeftViewController" bundle:nil];
RightViewController* rightController = [[RightViewController alloc] initWithNibName:@"RightViewController" bundle:nil];
// ViewController *centerController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
FirstViewController *centerController = [[FirstViewController alloc] initWithNibName:@"FirstView" bundle:nil];
self.centerController = [[UINavigationController alloc] initWithRootViewController:centerController];
IIViewDeckController* deckController = [[IIViewDeckController alloc] initWithCenterViewController:self.centerController
leftViewController:self.leftController
rightViewController:rightController];
deckController.rightSize = 100;
self.window.rootViewController = deckController;
// Add the tab bar controller's view to the window and display.
[self.window addSubview:tabBarController.view];
答案 0 :(得分:0)
因为看起来你正在使用IIViewDeckController,所以请查看它的automaticUpdateTabBarItems属性。