小编dix*_*_va的帖子

在现有的Xcode故事板上使用pkrevealcontroller

我正在尝试将pkrevealcontroller滑动菜单集成到现有的iOS项目中,该项目具有segues等现有故事板.我扩展了UINavigationViewController并将我的新类链接到故事板上的Nav Controller.在我的app委托中,我执行以下操作:

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;
Run Code Online (Sandbox Code Playgroud)

当我运行应用程序时,它成功地将滑动菜单图标添加到导航栏,并且前视图可以根据需要进行滑动.但它没有使用我在故事板上添加的标题或segues.是我正在尝试甚至可能.

iphone storyboard uinavigationcontroller ios

3
推荐指数
1
解决办法
2987
查看次数

标签 统计

ios ×1

iphone ×1

storyboard ×1

uinavigationcontroller ×1