導(dǎo)讀1,適配UITableViewif#available(iOS11.0, *) {self.contentInsetAdjustmentBehavior= .neverself.estimatedR... 1,適配UITableView if#available(iOS11.0, *) { self.contentInsetAdjustmentBehavior= .never self.estimatedRowHeight=0 self.estimatedSectionHeaderHeight=0 self.estimatedSectionFooterHeight=0 }else{ } 2,適配UIScrollView if#available(iOS11.0, *) { scrollView?.contentInsetAdjustmentBehavior= .never }else{ } 3,UITableView中的sectionHeader或者Footer顯示不正常 還有的發(fā)現(xiàn)某些界面tableView的sectionHeader、sectionFooter高度與設(shè)置不符的問(wèn)題,在iOS11中如果不實(shí)現(xiàn)-tableView: viewForHeaderInSection:和-tableView: viewForFooterInSection:,則-tableView: heightForHeaderInSection:和- tableView: heightForFooterInSection:不會(huì)被調(diào)用,導(dǎo)致它們都變成了默認(rèn)高度,這是因?yàn)閠ableView在iOS11默認(rèn)使用Self-Sizing,tableView的estimatedRowHeight、estimatedSectionHeaderHeight、estimatedSectionFooterHeight三個(gè)高度估算屬性由默認(rèn)的0變成了UITableViewAutomaticDimension,解決辦法簡(jiǎn)單粗暴,就是實(shí)現(xiàn)對(duì)應(yīng)方法或把這三個(gè)屬性設(shè)為0。 4,適配網(wǎng)頁(yè)加載不全下面有白邊 if#available(iOS11.0, *) { webView.scrollView.contentInsetAdjustmentBehavior= .never }else{ } 5,適配iPhoneX不能鋪滿屏的問(wèn)題 <1>給Brand Assets添加一張1125*2436大小的圖片 打開(kāi)Assets.xcassets文件夾,找到Brand Assets 右鍵Show in Finder 添加一張1125*2436大小的圖片 <2>修改Contents.json文件,添加如下內(nèi)容 { "extent" : "full-screen", "idiom" : "iphone", "subtype" : "2436h", "filename" : "1125_2436.png”, "minimum-system-version" : "11.0", "orientation" : "portrait", "scale" : "3x" } 6,適配iPhoneX //適配iPhoneX letLL_iPhoneX = (kScreenW == Double(375.0) && kScreenH == Double(812.0) ?true:false) letkNavibarH = LL_iPhoneX ? Double(88.0) : Double(64.0) letkTabbarH = LL_iPhoneX ? Double(49.0+34.0) : Double(49.0) letkStatusbarH = LL_iPhoneX ? Double(44.0) : Double(20.0) 7,xcode9打包注意事項(xiàng) xcode9打包版本只能是8.2及以下版本,或者9.0及更高版本 xcode9不支持8.3和8.4版本 xcode9新打包要在構(gòu)建版本的時(shí)候加入1024*1024 AppSore icon 總結(jié) 以上所述是小編給大家介紹的iOS11&iPhoneX適配&Xcode9打包注意事項(xiàng),希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)本站網(wǎng)站的支持!
您可能感興趣的文章:
|
溫馨提示:喜歡本站的話,請(qǐng)收藏一下本站!