Skip to content

Instantly share code, notes, and snippets.

@iCocoa iCocoa/.m
Last active Mar 26, 2019

Embed
What would you like to do?
系统版本判断、
#define kAutoScreenWidth(value) ([UIScreen mainScreen].bounds.size.width / 375.0f * value)
[[UIDevice currentDevice].systemVersion floatValue]
#define isIPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? [[UIScreen mainScreen] currentMode].size.height==2436 : NO)
#define NavBarHeight isIPhoneX ? 88 : 64
#define TabBarHeight isIPhoneX ? 83 : 49
#define StatusBarHeight isIPhoneX ? 44 : 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.