(iOS)viewController背景透明化
#ifdef __IPHONE_8_0
if ([EFUNKakaoCenter deviceOsVersion].intValue < ) {
[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
(iOS)viewController背景透明化的更多相关文章
- iOS 图片背景模糊效果
iOS 图片背景模糊效果 1.使用CoreImage中的模糊滤镜 原始效果图如下: CoreImage的实现: - (void)viewDidLoad { [super viewDidLoad]; / ...
- Windows界面编程第五篇 静态控件背景透明化(13篇)
上一篇<Windows界面编程第三篇 异形窗体 普通版>和<Windows界面编程第四篇异形窗体 高富帅版>介绍了异形窗口(异形窗体)的创建,并总结出了异形窗口的“三要素”: ...
- iOS - ViewController的生命周期
iOS SDK中提供很多原生的ViewController,大大提高了我们的开发效率:那么下面我们就根据开发中我们常用的ViewController谈一谈它的生命周期: (一)按照结构和用法可以对iO ...
- iOS ViewController生命周期
ViewController是view的controller,viewController的职责主要包括管理内部各个view的加载显示与卸载,同时负责与其他ViewController的通信和协调. ...
- 【Xamarin 开发 IOS --IOS ViewController生命周期】
ViewController ViewController是IOS开发中MVC模式中的C,ViewController是view的controller,ViewController的职责主要包括管理内 ...
- ios ViewController的生命周期分析和基本使用逻辑
按结构可以对iOS的所有ViewController分成两类:1.主要用于展示内容的ViewController,这种ViewController主要用于为用户展示内容,并与用户交互,如UITable ...
- iOS给背景添加点击事件
当点击背景的时候出发事件,或者跳转界面或者产生其他的响应 -(void)viewDidLoad { UIImageView * imageView = [UIImageView alloc]init ...
- iOS viewController 和 view 的创建消失生命周期总结
控制器创建的生命周期 1. 如果从stroryBoard 中产生一个controller,那么会先调用initWithCoder:, awakeFromNib, loadView,viewDidLoa ...
- ios ViewController present不同的方向
First ViewController CATransition *transition = [CATransition animation]; transition.duration = 0.3; ...
随机推荐
- Ext.Net 使用总结之GridPanel中的选中行
1.判断GridPanel中是否选中了某行 if (!GridPanel1.hasSelection()) { Ext.Msg.alert("提示", "请选择记录!&q ...
- gridview中使用href调用javascript
传递参数(多个)可用以下两种方法: 方法一: <asp:TemplateField HeaderText="列名1"> <ItemTemplate> < ...
- HTTP错误500.22 检测到在集成的托管管道模式下不适用的ASP.NET设置
这里主要把集成模式改成经典模式 解决方案一: 解决方案二: 修改配置文件web.config 将 <configuration> <system.web> <compil ...
- Matlab中用内建函数代替for循环
在使用matlab进行矩阵计算的时候,经常会遇到要使用for循环的情况.但其实很多操作可以用内部的一些函数代替. bsxfun, arrayfun, cellfun, spfun, structfun ...
- NSString 的常见方法
NSString的常用方法 创建一个新字符串并将其设置为 path 指定的文件的内容,使用字符编码enc,在error上返回错误 + (id)stringWithContentsOfURL:(NSUR ...
- Java随机输出验证码包含数字、字母、汉字
//随机验证码,有数字.字符 //生成随机数,然后再截取,还要限定随机数的范围 String zimu = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn ...
- 无法连接远程mysql问题
按照别人的博客操作之后,重启了服务: 前几天,windows上的mysql无法远程连接,在网上搜了一下,都是一个说法,神马改表.加权限.刷新等等,尝试之后都没有用,后来同事告诉了我一个方法,就解决了那 ...
- Aliyun EMR 集群重启
1.如果Core节点有Down掉,ActiveNodes少于Core节点数. 处理: a.登陆到Master节点,到目录 /opt/apps/hadoop-2.7.2/sbin b.执行 ./stop ...
- NetWare
本地网络连接属性中就有Netware客户端服务项 概括的说,Netware是NOVELL公司推出的网络操作系统,Netware最重要的特征是基于基本模块设计思想的开放式系统结构. Netware是一个 ...
- Asp.Net 禁用cookie后使用session
原文地址:http://www.c-sharpcorner.com/UploadFile/deepak.sharma00/using-cookie-less-session-in-Asp-Net/ H ...