<分区>
在 iOS 7 之前,根据这个流行的 Stackoverflow question,显示具有清晰背景的 ViewController 的方法是在主 ViewController 中执行以下操作:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"SecondViewController"];
vc.view.backgroundColor = [UIColor clearColor];
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:vc animated:NO completion:nil];
但是,正如我最近在 iOS 7 中发现的那样(以及其他人对主要答案的评论),上述解决方案不再有效,而是只显示一个黑色模型 Controller 。我知道透明度主要用于 iOS 7,因此透明 View Controller 很有可能成为可能。我还没有找到解决这个问题的方法,想知道是否有人知道如何解决这个问题。谢谢!