我正在使用JASidePanels与 Facebook 具有相同的布局,但有一些限制,我希望您帮助我:
在中心视图控制器的导航控制器中添加右键
在不同的视图控制器中按下按钮后,将中心视图更改为不同的视图
从左侧或右侧告诉中心视图控制器推送视图
从左侧或右侧转到标签栏视图控制器内的视图
这是我在 MainAppDelegate 中的实现:
/* tabbar views with their navigation controller */
SearchViewController *searchViewController = [[SearchViewController alloc]
initWithNibName:@"SearchViewController" bundle:nil];
self.searchNavController = [[UINavigationController alloc]
initWithRootViewController:searchViewController];
MainViewController *mainViewController = [[MainViewController alloc]
initWithNibName:@"MainViewController" bundle:nil];
self.mainNavController = [[UINavigationController alloc]
initWithRootViewController:mainViewController];
/* uiviewcontroller for our left side view */
SideMenuViewController *sideMenuViewController=[[SideMenuViewController alloc]
initWithNibName:@"SideMenuViewController" bundle:nil];
/* the center view of the side panel */
self.mainSidePanelviewController = [[JASidePanelController alloc] init];
self.mainSidePanelviewController.shouldDelegateAutorotateToVisiblePanel = NO;
/* set the properties of JASidePanel*/
self.mainSidePanelviewController.leftPanel = sideMenuViewController ;
self.mainSidePanelviewController.centerPanel = self.mainNavController;
[self.mainSidePanelviewController.centerPanel.navigationController
setNavigationBarHidden:YES animated:YES];
NSArray *controllers = [NSArray arrayWithObjects:
self.mainSidePanelviewController,self.searchNavController ,nil];
[self.tabController setViewControllers:controllers];
// the tab bar is our root view
self.window.rootViewController = self.tabController;
[self.window makeKeyAndVisible];
如果有更好的开源项目可以让我做我想做的事,请给我链接