我试图在navigationBar和rootView上添加一个menuViewController。
menuView = [[MenuViewController alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width*0.4, self.view.frame.size.height)];
UIViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
rootViewController.modalPresentationStyle = UIModalPresentationFullScreen;
[[self navigationController] presentViewController:menuView animated:YES completion:nil];
这是我的代码,但动画后视图变黑。
有什么想法吗?
答案 0 :(得分:0)
尝试使用UIModalPresentationCurrentContext
代替UIModalPresentationFullScreen
。