zoukankan      html  css  js  c++  java
  • iOS 难题解决日志------2层控制器 上面的控制器显示透明

     f ([[[UIDevice currentDevicesystemVersionfloatValue]>=8.0) {

            nextVC.modalPresentationStyle=UIModalPresentationOverCurrentContext;

        }else{

            self.modalPresentationStyle=UIModalPresentationCurrentContext;

            // 此处的self-----> 猜测指的是 弹出    nextVC 的控制器  可以是[UIApplication sharedApplication]..keyWindow.rootViewController

        }

        [self presentViewController: nextVC animated:YES completion:nil];

    以上已经过测试 非常好用 下面是 如果以后还碰到上面的问题 但是不能用了 就试试下面的

    第一种:

    1. YLSLockScreenViewController *lockScreenController = [[YLSLockScreenViewController alloc] init];  
    2. lockScreenController.modalPresentationStyle = UIModalPresentationFormSheet;// 窗口  
    3.       
    4. [self.mainViewController presentViewController:lockScreenController animated:YES completion:^(void){  
    5.     lockScreenController.view.superview.backgroundColor = [UIColor clearColor];// 背景色透明  
    6. }];  
    7.  
    8.  

     第二种:

    ios7:
    presentingVC.modalPresentationStyle = UIModalPresentationCurrentContext;


    ios8:
    modalVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
    modalVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

    and then in both:
    [presentingVC presentViewController:modalVC animated:YES completion:nil];

  • 相关阅读:
    揭秘Amazon反应速度超快的下拉菜单
    CSS3滤镜
    雅虎团队经验:网站页面性能优化的34条黄金守则
    10条影响CSS渲染速度的写法与建议
    前端优秀网站
    视频媒体播放,最好的 HTML 解决方法
    zen-coding for notepad++,前端最佳手写代码编辑器
    ASP.NET中IsPostBack详解
    w3c教程
    怎样才能成为优秀的前端开发工程师
  • 原文地址:https://www.cnblogs.com/pp-pping/p/4372671.html
Copyright © 2011-2022 走看看