我正在使用aryaxt/iOS-Slide-Menu。我的问题是:我需要根据显示的视图控制器显示不同的左侧菜单。这是我在 AppDelegate 中的代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
UserMenuViewController *leftMenu = (UserMenuViewController *) [self.window.rootViewController.storyboard instantiateViewControllerWithIdentifier:@"UserMenuViewController"];
[SlideNavigationController sharedInstance].leftMenu = leftMenu;
当我尝试更改特殊 ViewController 中的左侧菜单时,左侧菜单中出现黑屏。
AppDelegate *sharedeDelegate = ((AppDelegate *)[UIApplication sharedApplication].delegate);
ProfessionalMenuViewController *leftMenu = (ProfessionalMenuViewController *) [sharedeDelegate.window.rootViewController.storyboard instantiateViewControllerWithIdentifier:@"ProfessionalMenuViewController"];
[SlideNavigationController sharedInstance].leftMenu = leftMenu;
我尝试了很多东西,但没有任何效果。谢谢!