我期待整合PKRevealController并为我的应用程序提供整体滑动设置菜单。 我找不到任何有关故事板的教程。我已经有一个故事板,它带有一个指向rootviewcontroller(在我的情况下称为LoginViewController)的箭头的navigationcontroller(默认出现的那个)。集成PKRevealController与故事板
以下为PKRevealController任何文件我增加了一个单独的viewController场景制作及一流的PKRevealController,然后在应用程序委托
@interface AhmAppDelegate() <PKRevealing>
@property (nonatomic, strong, readwrite) PKRevealController *revealController;
@end
@implementation AmAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary
*)launchOptions
{
self.revealController = (PKRevealController *)self.window.rootViewController;
self.window.rootViewController = self.revealController;
LoginViewController *frontViewController = [[UIStoryboard storyboardWithName:@"Mainview_iPad"
bundle:nil] instantiateViewControllerWithIdentifier:@"LoginViewController"];
[self.revealController setFrontViewController:frontViewController];//This throws the error
return YES;
}
这样做运行此我得到以下错误
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'-[UINavigationController setFrontViewController:]: unrecognized selector sent to instance
0xb17aec0'
我在做什么错了?