pch文件的导入 :$(SRCROOT)/项目名/pch文件名
pch文件 常用宏定义
屏幕大小
#define ViewWith [UIScreen mainScreen].bounds.size.width
#define ViewHight [UIScreen mainScreen].bounds.size.height
适配
#define WithwithView(a) [UIScreen mainScreen].bounds.size.width/375*a
#define WithwithView(a) [UIScreen mainScreen].bounds.size.height/568*a
时间: 2024-10-11 23:17:30