iOS8需要兼容的内容
2024-09-29 22:54:02
本文转载至 http://blog.csdn.net/liuwuguigui/article/details/39494435
1.iPad上使用presentModalViewController,custion size not work on ios8 SDK。使用如下方法解决:
In iOS 8 you can also use UIPresentationController which gives you more customization options.
#define IsiOS8Later ([[[UIDevice currentDevice] systemVersion] doubleValue]>=8.0)?YES:NO
This will Work:
AboutViewController * _aboutViewController = [[AboutViewController alloc] init];
_aboutViewController.modalPresentationStyle = UIModalPresentationFormSheet;
if(IS_IOS8)
{
_aboutViewController.preferredContentSize = CGSizeMake(300, 300);
}
[self presentViewController:_aboutViewController animated:YES completion:nil];
In AboutViewController.m
- (void)viewWillLayoutSubviews{
[super viewWillLayoutSubviews];
if(!IS_IOS8)
{
self.view.superview.bounds = CGRectMake(0, 0, 300, 300);
}
}
最新文章
- Redis C#缓存的使用
- 【C】制作简单的时钟减法程序
- Sigmaplot激活码获取地址
- 初始化httpclient的几种方式
- java生成验证码的逻辑
- java 构造函数内部的多态方法 完全剖析
- 单选复选按钮以及Toast学习笔记
- Editplus 中将文本换行替换为<;p>;标签的正则表达式
- Kicad中批量添加过孔
- HDU 3572 最大流
- 浅析 C++里面的宏
- Struts2实现国际化
- Jquery取属性值(复选框、下拉列表、单选按钮)、做全选按钮、JSON存储、去空格
- CodeSmith系列(三)——使用CodeSmith生成ASP.NET页面
- hadoop问题: bin/hadoop fs -ls ls: `.&#39;: No such file or directory
- [Reinforcement Learning] Model-Free Prediction
- Vue一个案例引发「动画」的使用总结
- 2018-06-20 中文代码示例视频演示Python入门教程第四章 控制流
- 红米Note5进入全网通5.0时代,其实是高通已经落后了!
- java反射机制实例