常用的宏

2016-05-14  本文已影响9人  木子尚武

1.用来进行手机尺寸适配

   #define iphone6P (XMGScreenH == 736)
   #define iphone6 (XMGScreenH == 667)
   #define iphone5 (XMGScreenH == 568)
   #define iphone4 (XMGScreenH == 480)
   #define LSWScreenH [UIScreen mainScreen].bounds.size.height
   #define LSWScreenW [UIScreen mainScreen].bounds.size.width

2.随机色

 #define LSWColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
 #define LSWGlobeColor LSWColor(215, 215, 215)
上一篇下一篇

猜你喜欢

热点阅读