iphone exとxcode 9のいくつかのピット
1423 ワード
1 xocde , iphonex , , , !!![443FB264-B01C-40EF-BC4D-FC16100BFF61.png](http://upload-images.jianshu.io/upload_images/2581353-f75afa759e44c092.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
: launchImage , ; iphonex , , iphonex , 6 ; launchImage , ;
2 xcode icon 1024*1024 , , appstore ; ;
3 iphonex ; ;
/** */
#define kSCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
#define kSCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
/** iphone X */
// , 20, ,
#define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
//
#define kNavBarHeight 44.0
// 64, ,
#define kTopHeight (kStatusBarHeight + kNavBarHeight)
// tabBar , 49, , 34
#define kTabBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49)
// iphonex 20 iphonex ( iphonex , ) iphonex , , tabview kSCREEN_HEIGHT-KGESTURESHomeHeight-kTopHeight
#define KGESTURESHomeHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?34:0)
// iphonex
#define KIS_IPhoneX kStatusBarHeight>20?YES:NO
ios11 shar ; sdk