iOS 之 [UIScreen mainScreen].scale
来源:互联网 发布:信达证券网上交易软件 编辑:程序博客网 时间:2024/04/29 10:24
[[UIScreen mainScrenn] scale]这句代码的作用是判断屏幕的分辨率的。
if (1.0 == [[UIScreen mainScreen] scale]) //代表 320 x 480 的分辨率if (2.0 == [[UIScreen mainScreen] scale]) //代表 640 x 960 的分辨率if (3.0 == [[UIScreen mainScreen] scale]) //代表 1242 x 2208 的分辨率
@property(nonatomic,readonly) CGFloat scale NS_AVAILABLE_IOS(4_0);
这个 property 简单的来理解就是判断一个点包含有几个像素:
iPhone 4 之前的设备为1.0
iPhone 4 ~ iPhone 6s (除plus外) 的为2.0
iPhone 6 plus 和 iPhone 6s plus 的为3.0
声明:此博文源自 http://blog.csdn.net/shenyuanluo/article/details/50618854
如需转载,请说明博文出处。谢谢!
0 0
- iOS 之 [UIScreen mainScreen].scale
- iOS [UIScreen mainScreen].scale
- iOS [[UIScreen mainScreen] scale]是什么?
- [[UIScreen mainScreen] scale]详解
- [[UIScreen mainScreen] scale]
- [[UIScreen mainScreen] scale]
- [UIScreen mainScreen].scale是什么?
- [UIScreen mainScreen].scale
- [UIScreen mainScreen] ;
- [ios ui][[UIScreen mainScreen] bounds]和 applicationFrame
- ios [UIScreen mainScreen] bounds] 获取尺寸不对
- IOS学习笔记2-IOS屏幕 [[UIScreen mainScreen] bounds] 与[UIScreen mainScreen] applicationFrame]区别
- [[UIScreen mainScreen] bounds] 和[UIScreen mainScreen] applicationFrame]
- iOS [UIScreen mainScreen].bounds 获取屏幕大小不对的问题
- iOS [UIScreen mainScreen].bounds 获取屏幕大小不对的问题
- iOS [UIScreen mainScreen].bounds 获取屏幕大小不对的问题
- [ UIScreen mainScreen ].applicationFrame
- [[UIScreen mainScreen] applicationFrame]
- 什么是纯通用词、地区通用词?
- LVS ---nat模式
- css动画
- C#音频采集 (笔记)
- 不做跨境电商的外贸企业生意越来越难做
- iOS 之 [UIScreen mainScreen].scale
- Python教程学习简记2--Python 函数调用 定义函数 函数的参数 递归函数
- 欢迎使用CSDN-markdown编辑器
- 【概率与期望】【暴力搜索】[Codeforces#621]题解+总结
- 平衡二叉树(AVL树)的创建,查找
- 实现手机号码合法性判断的函数
- BZOJ-1491 社交网络 FLoyd+乱搞
- JS Replace 全部替换字符 用法
- 这篇很简单,只是一个新手发神经而已。关于oracle的date类型的格式转化。