iOS规范尺寸是指iOS应用程序的屏幕尺寸,其中包括iPhone、iPad和Apple Watch等设备。iPhone:
iOS规范尺寸是指iOS应用程序的屏幕尺寸,其中包括iPhone、iPad和Apple Watch等设备。
iPhone:
- iPhone 4s:3.5英寸(960×640像素)
- iPhone 5/5s/SE:4英寸(1136×640像素)
- iPhone 6/6s/7/8:4.7英寸(1334×750像素)
- iPhone 6 Plus/6s Plus/7 Plus/8 Plus:5.5英寸(1920×1080像素)
- iPhone X/XS:5.8英寸(2436×1125像素)
- iPhone XR:6.1英寸(1792×828像素)
- iPhone XS Max:6.5英寸(2688×1242像素)
iPad:
- iPad:9.7英寸(2048×1536像素)
- iPad Mini:7.9英寸(2048×1536像素)
- iPad Pro:12.9英寸(2732×2048像素)
Apple Watch:
- 38mm:272×340像素
- 42mm:312×390像素
以下是代码示例:
// iPhone 4s
#define kScreenWidth 960
#define kScreenHeight 640
// iPhone 5/5s/SE
#define kScreenWidth 1136
#define kScreenHeight 640
// iPhone 6/6s/7/8
#define kScreenWidth 1334
#define kScreenHeight 750
// iPhone 6 Plus/6s Plus/7 Plus/8 Plus
#define kScreenWidth 1920
#define kScreenHeight 1080
// iPhone X/XS
#define kScreenWidth 2436
#define kScreenHeight 1125
// iPhone XR
#define kScreenWidth 1792
#define kScreenHeight 828
// iPhone XS Max
#define kScreenWidth 2688
#define kScreenHeight 1242
// iPad
#define kScreenWidth 2048
#define kScreenHeight 1536
// iPad Mini
#define kScreenWidth 2048
#define kScreenHeight 1536
// iPad Pro
#define kScreenWidth 2732
#define kScreenHeight 2048
// Apple Watch 38mm
#define kScreenWidth 272
#define kScreenHeight 340
// Apple Watch 42mm
#define kScreenWidth 312
#define kScreenHeight 390
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(56条)