我有2个VC - firstVC
和secondVC
。
secondVC
的视图颜色为clear color
,其视图为UIVisualEffect
,模糊不清。
我想在secondVC
上以firstVC
模式提出firstVC
,但当我这样做时,p.layout.margin = struct('b', 15,'l', 30, 'r', 0, 't', 0);
会变黑。
谢谢
答案 0 :(得分:1)
如果ios版本> = 8.0则
SecondViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext;
[self presentViewController:SecondViewController animated:YES completion:nil];
如果使用ios7&导航控制器然后
self.navigationController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:SecondViewController animated:YES completion:nil];
如果没有导航控制器那么
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:SecondViewController animated:YES completion:nil];
答案 1 :(得分:1)
您需要在呈现的(secondVC)控制器上正确设置modalPresentationStyle
。
UIModalPresentationOverFullScreen
或UIModalPresentationOverCurrentContext
将提供第二个VC内容超过第一个VC顶部的效果。