我需要快速版本的Obj.C Macro
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_IPHONE5 (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 568.0f)
答案 0 :(得分:1)
在class
代码
let IS_IPHONE = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.Phone
let IS_IPHONE5 = IS_IPHONE && UIScreen.mainScreen().bounds.size.height == 568.0