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
  • 相关阅读:
    Vue基本使用
    缓存数据库
    Web框架
    爬虫基础知识及scrapy框架使用和基本原理
    轮播组件/瀑布流/组合搜索/KindEditor插件
    Model&Form&ModelForm拾遗
    评论操作展示
    评论操作
    windows 下安装 redis
    Notepad++ 列块模式编辑,替换换行符
  • 原文地址:https://www.cnblogs.com/mingfung-liu/p/4444326.html
Copyright © 2011-2022 走看看