IOS8以上或以下 presentViewController 背景不透明解决办法
2016-12-16 11:14
645 查看
IOS8及以上,设置
nextVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
IOS8以下,设置
self.modalPresentationStyle = UIModalPresentationCurrentContext;
其中 nextVC 是要显示的ViewController, self是当前ViewController。
全部代码如下:
nextVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
IOS8以下,设置
self.modalPresentationStyle = UIModalPresentationCurrentContext;
其中 nextVC 是要显示的ViewController, self是当前ViewController。
全部代码如下:
nextVC.view.backgroundColor = [UIColor clearColor]; if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) { nextVC.modalPresentationStyle = UIModalPresentationOverCurrentContext; } else { self.modalPresentationStyle = UIModalPresentationCurrentContext; } [self presentViewController:nextVC animated:YES completion:nil];
相关文章推荐
- iOS8以iOS8以下的系统present一个半透明的ViewController的方法
- iOS8以iOS8以下的系统present一个半透明的ViewController的方法
- iOS 7.0 presentViewController 背景变黑的解决办法
- ipad项目下 更改tableview 的背景为透明不起作用----------解决办法
- 解决ie7以下浏览器PNG图片背景不透明且链接失效的办法
- present一个背景透明的viewController
- iOS8下 presentViewController的透明部分 变成黑色不透明了
- iOS 弹出透明窗体viewcontroller【兼容iOS8以上】
- flash在ie下面,加了transparent,背景仍不透明的解决办法
- 关于AutoCompleteTextView设置背景无效的解决办法
- Applications are expected to have a root view controller at the end of application解决办法
- IE6下PNG格式的图片背景不透明的解决办法
- IE6解决png背景不透明办法
- ie6下png图片背景不透明的解决办法使用js实现
- 有关ie6下PNG图片背景不透明的一个js的解决办法
- C# winfrom中Flash播放使用axShockwaveFlash控件设置透明XP出现白色背景解决办法,仿QQ魔法表情效果
- ModalViewController 透明背景代码
- 显示一个透明背景的ViewController在另一个ViewController上
- iPad 自定义UISplitViewController 无法横屏的解决办法。
- Android 3.0 以上系统 webView 无法在html中传值的解决办法