在iOS 7中,此方法没有问题:
_rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext; [_rootViewController presentViewController:self animated:NO completion:nil];
但是在iOS 8中它什么也没做.如何解决?这是iOS 8的Bug吗?
解决方法
我的答案更简单,代码如下.这适用于iOS8(XCode6 GM种子).
HogeViewController *vc = [[HogeViewController alloc] init]; vc.modalPresentationStyle = UIModalPresentationOverFullScreen; [self presentViewController:vc animated:NO completion:nil];