美文网首页
适配尺寸

适配尺寸

作者: 失忆的程序员 | 来源:发表于2018-10-26 17:48 被阅读29次
适配尺寸

#define IOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >=8.0? YES : NO)

#define kScreenHeight [UIScreen mainScreen].bounds.size.height

#define kScreenWidth [UIScreen mainScreen].bounds.size.width

/** iphone 5/5c/5s */

#define kW(R) R*(kScreenWidth) /320

#define kH(R) R*(kScreenHeight) /568

/** iphone 6 */

#define W(R) R*(kScreenWidth) /375

#define H(R) R*(kScreenHeight) /667

#define SYSTEM_VERSION  [[UIDevice currentDevice].systemVersion floatValue]

/** iPhone */

#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)

/** iPad */

#define IS_PAD (UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad)

/** 状态栏高度 */

#define XPF_StatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height

/** NavBarHeight */

#define XPF_NavBarHeight44.0

/** 底部tabbar高度 */

#define XPF_TabBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height >20?83:49)

/** 整个导航栏高度 */

#define XPF_TopHeight (XPF_StatusBarHeight + XPF_NavBarHeight)

相关文章

  • 屏幕适配的一些概念01

    设计尺寸规范-表格 设计尺寸规范-图文 设计尺寸规范-开发尺寸 也可以看看 屏幕适配的一些概念02 手机适配浏览,...

  • iOS 关于全面屏适配的方案及UI在不同尺寸下适配方案

    iOS 关于全面屏适配的方案及UI在不同尺寸下适配方案 iOS 关于全面屏适配的方案及UI在不同尺寸下适配方案

  • 适配面试

    图片的适配 应用图标 iOS 上传所需基本图片尺寸iOS App图标和启动画面尺寸 页面适配(横竖屏适配) Aut...

  • Android屏幕适配

    屏幕适配相关概念主流适配方案 一、屏幕适配相关概念 1、屏幕尺寸单位:英寸表示:手机对角线的物理尺寸 2、屏幕分辨...

  • iOS屏幕尺寸适配

    屏幕适配方法 针对不同屏幕尺寸的适配,主要有3种方式:1.不同屏幕尺寸下,元素的尺寸是固定的;2.不同屏幕尺寸下,...

  • App界面适配iOS11(包括iPhoneX的奇葩尺寸)

    App界面适配iOS11(包括iPhoneX的奇葩尺寸) App界面适配iOS11(包括iPhoneX的奇葩尺寸)

  • 适配尺寸

    #define IOS8 ([[[UIDevice currentDevice] systemVersion] f...

  • Apple 尺寸规范

    Apple 设备尺寸 iPhoneX机型适配

  • 知识点梳理7 必备必会

    屏幕适配 android 适配笔记 屏幕尺寸含义:手机对角线的物理尺寸单位:英寸(inch),1英寸=2.54cm...

  • iOS设备屏幕分辨率

    设备尺寸(英寸)尺寸(px)尺寸(pt)适配图iPhone 12 Pro Max6.71284 x 2778428...

网友评论

      本文标题:适配尺寸

      本文链接:https://www.haomeiwen.com/subject/jreltqtx.html