IOS判断Iphone5和Retina

#define isIPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define isRetina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
// 屏幕宽
#define
SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width // 屏幕高 #define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height

 

 

posted @ 2013-05-22 09:36  菜鸟程序猿  阅读(360)  评论(0编辑  收藏  举报