Automatically adapt to H5 containers (UIViewView/WKWebView), generate long charts, prevent progress bars, and adapt ioswkwebview to h5
Some time ago, during the cool development of the Code, the designer Wang gave Zhang moubao the APP a feature to generate a long image sharing function, and the company had this requirement, so he started practicing it immediately! After collecting and sorting data on the omnipotent du Niang, I found that the solution described in many articles is not applicable to WKWebView. After iOS8.0, the system basically uses WKWebView to load H5, which is often a large blank section, this is because the rendering method of WKWebView is different from that of UIWebView. Therefore, I am standing on the shoulder of "Giant" and harvesting "heads", and I wrote a demo of the best of both worlds, automatically match H5 containers based on the iOS system version, and integrate H5 to both containers to generate a long graph and a progress bar defense function, first, generate the core code diagram of the long graph (UIViewView on the top and WKWebView on the bottom ):
Github address: https://github.com/BeckWang0912/WZTWebView