我为我的应用设置了一个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;
}