标签:
#define WIDTH CGRectGetWidth([UIScreen mainScreen].bounds) #define HEIGHT CGRectGetHeight([UIScreen mainScreen].bounds) #define Screen [UIScreen mainScreen].bounds #define autoSizeScaleX (WIDTH>480?WIDTH/320.0:1.0) #define autoSizeScaleY (WIDTH>480?HEIGHT/568.0:1.0) #define WidthScale (autoSizeScaleX*WIDTH/750.0) #define HeightScale (autoSizeScaleY*HEIGHT/1334.0) CG_INLINE CGRect CGLFLMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height) { CGRect rect; rect.origin.x = x *autoSizeScaleX; rect.origin.y = y *autoSizeScaleY; rect.size.width = width *autoSizeScaleX; rect.size.height = height *autoSizeScaleY; return rect; } CG_INLINE CGPoint CGPointLFLMake(CGFloat x, CGFloat y) { CGPoint pointLFL; pointLFL.x = x * autoSizeScaleX; pointLFL.y = y * autoSizeScaleY; return pointLFL; } CG_INLINE CGSize CGSizeLFLMake(CGFloat width, CGFloat height) { CGSize sizeLFL; sizeLFL.width = width* autoSizeScaleX; sizeLFL.height = height* autoSizeScaleY; return sizeLFL; } #define FontScale 72.0/96.0
标签:
原文地址:http://www.cnblogs.com/levy/p/5883020.html