前几天在使用WKWebView时,发现加载H5页面显示不全,总是差一个导航的高度,利用contentInset调整不起作用,效果如图:
其原因是因为用了导航的作用,设置导航属性完美解决:
//加入代码
self.navigationController.navigationBar.translucent = NO;
最终效果
IMG_2600.png
前几天在使用WKWebView时,发现加载H5页面显示不全,总是差一个导航的高度,利用contentInset调整不起作用,效果如图:
其原因是因为用了导航的作用,设置导航属性完美解决:
//加入代码
self.navigationController.navigationBar.translucent = NO;
最终效果
IMG_2600.png
本文标题:解决WKWebView加载网页显示不全问题
本文链接:https://www.haomeiwen.com/subject/xcsktxtx.html
网友评论