• (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
  • 相关阅读:
    easyui 分页 MVC
    c#实现万年历示例分享 万年历农历查询
    GroupBy 带条件分组求和
    easyui_tree 复选框 动态加载树
    C#测试运行时间
    MVC 关于easyui-datebox 赋值问题
    MVC 上传 下载
    WindowsService 安装 cmd
    笔记 .Net反射机制
    C# 测试服务器连接 Ping
  • 原文地址:https://www.cnblogs.com/mingfung-liu/p/4444326.html
Copyright © 2020-2023  润新知