判断iPhone和iPad 判断设备版本

 

//判断iPhone和iPad

#define IS_IPHONE (!IS_IPAD)

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPhone)

//判断设备版本

#define IS_IOS6_LAGACY floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1

#define IS_IOS7 floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1

#define IS_IOS5_LAGACY floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_5_1

#define IS_IOS6_AFTER floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_5_1

 

posted @ 2015-11-20 11:44  yhj1787354782  阅读(301)  评论(0编辑  收藏  举报