閱讀63 返回首頁    go 阿裏雲 go 技術社區[雲棲]


有用的宏定義

// 是否高清屏
#define isRetina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
// 是否iPad
#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
// 是否模擬器
#define isSimulator (NSNotFound != [[[UIDevice currentDevice] model] rangeOfString:@"Simulator"].location)


最後更新:2017-04-02 22:16:33

  上一篇:go [筆記]Python的整數對象:PyIntObject
  下一篇:go How to build Windows Android2.3 SDK怎麼編譯windows下的android2.3 SDK