iOS8下 原来presentViewController的画面(不是全画面,画面以外地方透明)的透明部分 变成黑色不透明了
换句话说,self.modalPresentationStyle = UIModalPresentationCurrentContext;不好用了
今天试了无数个方法终于找到了解决方法。
ios8多了一个样式UIModalPresentationOverCurrentContext,跟原来的很相近哦。而且定义的对象也变成了弹出的视图。
所以用的话做版本判断:
if ([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0) {
nextVC.modalPresentationStyle=UIModalPresentationOverCurrentContext;
}else{
self.modalPresentationStyle=UIModalPresentationCurrentContext;
}
[self presentViewController: nextVC animated:YES completion:nil];