1、WKWebView适配:
WKWebView显示时有时会显示不全,顶部会有空白区域。这时设置
if (@available(iOS 11.0, *)) {
wkWebview.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
// Fallback on earlier versions
}
>>>>> wkWebview.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 其实设置这个就可以了,然后xcode会提示自适配