1.打包給測(cè)試不需要上架并發(fā)布在蒲公英上的app快速方法:編譯項(xiàng)目(command+B)->products(項(xiàng)目show in finder)將其拖到桌面 忠怖,新建一個(gè)命名為Payload的文件夾,將項(xiàng)目放里面壓縮叙量,改后綴為.ipa發(fā)布即可
2.iphone x適配
(1)增加啟動(dòng)圖像素為 1125*2436拜银,適配屏幕尺寸
111.png
(2)定義iphone x宏定義
// 判斷是否是iPhone X
#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
// 狀態(tài)欄高度
#define HEIGHT_STATUS_BAR (iPhoneX ? 44.f : 20.f)
// 導(dǎo)航欄高度
#define HEIGHT_NAV_STATUS_BAR (iPhoneX ? 88.f : 64.f)
// tabBar高度
#define HEIGHT_TAB_BAR (iPhoneX ? (49.f+34.f) : 49.f)
// home indicator
#define HOME_INDICATOR_HEIGHT (iPhoneX ? 34.f : 0.f)
#define SEARCH_HEIGHT (iPhoneX ? 44.f : 20.f)
(3)tableView cell高度問題和頭視圖尾視圖會(huì)有很大間隙坑鱼,解決辦法:
self.tableView.estimatedRowHeight = 0;
self.tableView.estimatedSectionHeaderHeight = 0;
self.tableView.estimatedSectionFooterHeight = 0;
(4)如果使用了Masonry進(jìn)行布局,就要適配safeArea
if ([UIDevice currentDevice].systemVersion.floatValue >= 11.0) {
make.edges.equalTo(self.view.safeAreaInsets);
} else {
make.edges.equalTo(self.view);
}