iOS,iPhone各机型设备号,屏幕宽高,屏幕模式
//获取设备型号
NSString *DeviceModel= [[UIDevice currentDevice] model];
//获取设备系统版本号
NSString *DeviceIOSVersion=[[UIDevice currentDevice] systemVersion];
// app名称
NSString *app_Name = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
// app版本
NSString *app_Version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
// app build版本
NSString *app_build = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
//获取到设备的型号信息,具体对应关系如下
iphone8,2 iphone6s
iphone7.2 iphone6
iphone7,1 iphone6plus
iphone6,2 iphone5s
iphone5,4 iphone5c
iphone 5,1 iphone5(移动,联通)
iphone 5,2 iphone5(移动,电信,联通)
iphone 4,1 iphone4S
iphone 3,1 iphone4(移动,联通)
iphone 3,2 iphone4(联通)
iphone 3,3 iphone4(电信)
iphone 2,1 iphone3GS
iphone 1,2 iphone3G
iphone 1,1 iphone
ipad 1,1 ipad 1
ipad 2,1 ipad 2(Wifi)
ipad 2,2 ipad 2(GSM)
ipad 2,3 ipad 2(CDMA)
ipad 2,4 ipad 2(32nm)
ipad 2,5 ipad mini(Wifi)
ipad 2,6 ipad mini(GSM)
ipad 2,7 ipad mini(CDMA)
ipad 3,1 ipad 3(Wifi)
ipad 3,2 ipad 3(CDMA)
ipad 3,3 ipad 3(4G)
ipad 3,4 ipad 4(Wifi)
ipad 3,5 ipad 4(4G)
ipad 3,6 ipad 4(CDMA)
ipod 5,1 ipod touch 5
ipod 4,1 ipod touch 4
ipod 3,1 ipod touch 3
ipod 2,1 ipod touch 2
ipod 1,1 ipod touch
//取到屏幕Retina分辨率
CGFloat scale = [UIScreen mainScreen].scale;
| 尺寸 | 设备 | 点 | Retina | 像素 | 屏幕比 |
| 3.5 | iPhone iPhone 3G iPhone 3GS |
320x480 | 1 | 320x480 | 3:2 |
| 3.5 | iPhone 4 iPhone 4S |
320x480 | 2 | 640x960 | 3:2 |
| 4 | iPhone 5 iPhone 5s iPhone 5c iPhone SE |
320x568 | 2 | 640x1136 | 16:9 |
| 4.7 | iPhone 6 iPhone 6s |
375x667 | 2 | 750x1334 | 16:9 |
| 5.5 | iPhone 6 Plus iPhone 6s Plus |
414x736 | 3 | 1242x2208 | 16:9 |
| 7.9 | iPad Mini | 768x1024 | 1 | 768x1024 | |
| 7.9 | iPad Mini 2 iPad Mini 3 iPad Mini 4 |
768x1024 | 2 | 1536x2048 | |
| 9.7 | Pad iPad 2 |
768x1024 | 1 | 768x1024 | |
| 9.7 | iPad 3 iPad 4 iPad Air iPad Air 2 iPad Pro 9.7 |
768x1024 | 2 | 1536x2048 | |
| 12.9 | iPad Pro 12.9 | 1024x1366 | 2 | 2048x2732 |
iOS,iPhone各机型设备号,屏幕宽高,屏幕模式的更多相关文章
- flutter 屏幕宽高 状态栏高度
MediaQuery.of(context) 包含了一些屏幕的属性: size : 一个包含宽度和高度的对象,单位是dp print(MediaQuery.of(context).size); //输 ...
- android获取屏幕宽高与获取控件宽高
获取屏幕宽高 // 获取屏幕宽高(方法1) int screenWidth = getWindowManager().getDefaultDisplay().getWidth(); // 屏幕宽(像素 ...
- Android编程心得-在任意类中获取当前屏幕宽高
进行Android编程时,很多时候都需要获取当前屏幕的宽度与高度,但是当我们需要在别的类中调用屏幕宽高时,直接用原来的方法是不行的,下面我来介绍如何在任意类中调用宽度高度的两种方法. public v ...
- Flutter获取屏幕宽高和Widget大小
我们平时在开发中的过程中通常都会获取屏幕或者 widget 的宽高用来做一些事情,在 Flutter 中,我们可以使用如下方法来获取屏幕或者 widget 的宽高. MediaQuery 一般情况下, ...
- vue 获取屏幕宽高 width height
/** * 获取屏幕宽高 */ Vue.prototype.getViewportSize = function(){ return { width: window.innerWidt ...
- android 获取屏幕宽高 和 获取控件坐标
一.获取屏幕宽高: (1). WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE); int width ...
- uwp - 获取当前屏幕宽高/应用宽高
原文:uwp - 获取当前屏幕宽高/应用宽高 public static Size GetScreen() { var applicationView = ApplicationView.GetFor ...
- android屏幕适配的全攻略3-动态获取手机屏幕宽高及动态设置控件宽高
1.获取手机屏幕宽高: DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetr ...
- iOS学习-压缩图片(改变图片的宽高)
压缩图片,图片的大小与我们期望的宽高不一致时,我们可以将其处理为我们想要的宽高. 传入想要修改的图片,以及新的尺寸 -(UIImage*)imageWithImage:(UIImage*)image ...
随机推荐
- Leetcode Unique Binary Search Trees
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For examp ...
- Codeforces Testing Round #10 B. Balancer
水题,只要遍历一遍,不够平均数的,从后面的借,比平均数多的,把多余的数添加到后面即可,注意数据范围 #include <iostream> #include <vector> ...
- 【BZOJ】1987: Zju2672 Fibonacci Subsequence
题意 给出一个序列\(A\),求一个最长的满足fib性质的子序列,输出其长度及其元素(如果多种方案,输出位置最靠前的).(\(n \le 3000\)) 题解 容易想到dp,即\(d(i, j)\)表 ...
- asp.net mvc4 HTTP Error 403.14
asp.net mvc4项目部署到II&上时,出现HTTP Error 403.14 - Forbidden - The Web server is configured to not lis ...
- GO语言练习:实现最简单的http helloword 服务器
用Go语言实现一个最简单的http服务器端,主要用到了package io, log, net/http 这个3个库. 用到的函数包括: http.Handle() http.HandlerFunc( ...
- MongoDB数据库的简介及安装
一.MongoDB数据库简介 简介 MongoDB是一个高性能,开源,无模式的,基于分布式文件存储的文档型数据库,由C++语言编写,其名称来源取自“humongous”,是一种开源的文档数据库──No ...
- 360浏览器Uncaught TypeError: object is not a function问题
刚刚360浏览器提示 Uncaught TypeError: object is not a function,找了半天发现问题是我有一个按钮,id和方法重复了,所以提示这个. <input t ...
- [LintCode] Sort Integers 整数排序
Given an integer array, sort it in ascending order. Use selection sort, bubble sort, insertion sort ...
- HDU2067/HDU1267 /HDU1130 递推
小兔的棋盘 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi ...
- POJ 1016 模拟字符串
Numbers That Count Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 20396 Accepted: 68 ...