我试图将JASidePanel集成到我的应用程序中。下面是我初始化 JSSidePanel 控制器的代码。
- (void)viewDidLoad {
[super viewDidLoad];
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main"
bundle: nil];
UIWindow *window= [UIApplication sharedApplication].keyWindow;
self.viewController = [[JASidePanelController alloc] init];
self.viewController.shouldDelegateAutorotateToVisiblePanel = NO;
self.viewController.leftPanel = [mainStoryboard instantiateViewControllerWithIdentifier:@"BBWSideMenuViewController"];
self.viewController.centerPanel = [self.navigationController.viewControllers lastObject];
window.rootViewController = self.navigationController;
[window makeKeyAndVisible];
}
按钮动作方法,
- (IBAction)openSideMenu:(id)sender {
[self.viewController showLeftPanelAnimated:YES];
}
当我按下按钮打开侧面菜单时,整个屏幕变黑。我该如何解决这个问题?任何帮助都感激不尽。