带有TabBarController的PKRevealController作为初始视图

时间:2013-10-21 02:42:37

标签: objective-c uitabbarcontroller

我为我的应用设置了一个PKRevealController菜单,效果很好。但是我想将菜单放在Tab Bar Controller内部的视图上。现在它只适用于未嵌入Tab Bar Controller内部的视图。有谁知道我怎么能做到这一点?

请参阅下面的现有代码。

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.revealController = (PKRevealController *)self.window.rootViewController;
    UIViewController *leftViewController = [[LeftMenuViewController alloc] init];
    PKRevealController *frontViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"MainNavViewController"];
    [self.revealController setFrontViewController:frontViewController];
    [self.revealController setLeftViewController:leftViewController];
    return YES;
}

0 个答案:

没有答案