zoukankan      html  css  js  c++  java
  • (iOS)viewController背景透明化

    #ifdef __IPHONE_8_0
    
            if ([EFUNKakaoCenter deviceOsVersion].intValue < 8) {
    
                [UIApplication sharedApplication].keyWindow.rootViewController.providesPresentationContextTransitionStyle = YES;
    
                [UIApplication sharedApplication].keyWindow.rootViewController.definesPresentationContext = YES;
    
                [[UIApplication sharedApplication].keyWindow.rootViewController setModalPresentationStyle:UIModalPresentationCurrentContext];  //注意,iOS8以下是设置rootViewController为ModalPresentationCurrentContext模式
    
            } else {
    
                [self setModalPresentationStyle:UIModalPresentationOverCurrentContext];//iOS8或以上是设置要被present的viewController为ModalPresentationOverCurrentContext模式
    
            }
    
    #else
    
            [UIApplication sharedApplication].keyWindow.rootViewController.providesPresentationContextTransitionStyle = YES;
    
            [UIApplication sharedApplication].keyWindow.rootViewController.definesPresentationContext = YES;
    
            [[UIApplication sharedApplication].keyWindow.rootViewController setModalPresentationStyle:UIModalPresentationCurrentContext];
    
    #endif
  • 相关阅读:
    什么是高可用?
    URL中两种方式传参
    Flask基本环境配置
    爬虫urlib库的一些用法
    HTML第一部分
    python中递归题
    python中重要的内置函数
    关于生成器中的send,应用移动平均值,以及yield from
    python中装饰器进阶
    一些作业
  • 原文地址:https://www.cnblogs.com/mingfung-liu/p/4444326.html
Copyright © 2011-2022 走看看