Automatically adapt to H5 containers (UIViewView/WKWebView), generate long charts, prevent WeChat progress bars, and adapt ioswkwebview to h5

Source: Internet
Author: User

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

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.