我正在尝试将pkrevealcontroller滑动菜单集成到现有的具有与segues等现有故事板的iOS项目中。我扩展了UINavigationViewController并将新类链接到故事板上的Nav Controller。在我的应用程序委托我做到以下几点:在现有的Xcode故事板上使用pkrevealcontroller
MainNavViewController *frontViewController = [[MainNavViewController alloc] initWithRootViewController:[[myRootViewController alloc] init]];
UIViewController *rightViewController = [[menuViewController alloc] init];
self.revealController = [PKRevealController revealControllerWithFrontViewController:frontViewController
rightViewController:rightViewController
options:nil];
self.window.rootViewController = self.revealController;
当我运行应用程序,它成功地增加了滑动菜单图标,导航栏,以及FrontView的幻灯片,我想它。但它并没有使用我在故事板上添加的标题或细节。我正在尝试甚至可能。
你所说的 “扩展UINavigationViewController” 是什么意思? PKRevealController在哪里进来?您在故事板中的问题中是否提到了任何控制器,或者是您添加的这些新控件? – rdelmar 2013-02-12 04:13:38
rdelmar - 我添加了应用程序委托的其余代码。通过扩展,我的意思是我创建了我自己的自定义类,它是uinavigationviewcontroller的一个子类。 MainNavViewController和myRootViewController在我的故事板中。 – 2013-02-12 04:17:53
您的故事板中是否有FrontViewController或右侧viewController?我试图找出故事板中的内容,以及您在应用程序委托中添加的新内容。 – rdelmar 2013-02-12 04:21:10