(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; ...
随机推荐
- 达内TTS6.0课件oop_day02
- Phalcon 调试应用程序
调试应用程序(Debugging Applications)¶ Phalcon中提供了提供了几种调试级别即通知,错误和异常. 异常类 Exception class 提供了发生错误时的一些经常使用的调 ...
- sql server 2005 表master..spt_values
IF OBJECT_ID('tempdb..#t') IS NOT NULL DROP TABLE #tGOcreate table #t(id int identity,Dt varchar(10) ...
- 【转】引入android项目在eclipse ADT中显示中文乱码问题
(1)修改工作空间的编码方式:Window->Preferences->General->Workspace->Text file Encoding在Others里选择需要的编 ...
- AdventureWorks2008 数据库安装
我使用的操作系统是 win 8.1,由于对早前安装的sql server 2008的兼容性不太好,要安装对应的service pack来解决一下这个问题. 如何使用 SQL Server 在 Wind ...
- Nio Client
public class NIOClient { static int SIZE = 2; final static int bufferSize = 500 * 1024; static InetS ...
- 浅谈Mybatis(三)
一.动态SQL 1.sql片段 解决sql语句的冗余代码问题. <sql id="SELECT_T_USER"> select id,name,password,bir ...
- webService接口大全
中文<->英文双向翻译WEB服务 获得标准数据 Endpoint: http://fy.webxml.com.cn/webservices/EnglishChinese.asmx Disc ...
- 监听器和web国际化
一.监听器 1.监听器:监听器就是一个java程序,功能是监听另一个java对象变化(方法调用.属性变更) 2.监听器监听过程:事件源.事件对象.监听器对象.操作事件源 1).存在被监听对象(事件源) ...
- php study plan personal
Php study schedule personal: 1. php intro + upper : imooc2. video course: php100, houdunwang (togeth ...