ios安装包用webview加载H5页面报:
This method should not be called on the main thread as it may lead to
UI unresponsiveness
这个错误
原因:
点击的是ios的头部的状态栏,是安全区域,才会报这个错,导致点击触发的事件可能时灵时不灵。
解决:
操作按钮离开安全区,用苹果自带的constant(safe-area-inset-top)和env(safe-area-inset-top);这两个值来有效规避在安全区的操作。或者加固定padding之类的也可以。
具体使用参考文章:
https://blog.csdn.net/zuoyiran520081/article/details/108366329