如何使用幻灯片菜单(与Facebook菜单相同)和tabbar一起使用

时间:2013-01-08 15:49:08

标签: uitabbarcontroller

请检查以下代码。我需要一起实现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];

1 个答案:

答案 0 :(得分:0)

因为看起来你正在使用IIViewDeckController,所以请查看它的automaticUpdateTabBarItems属性。