Home  >  Q&A  >  body text

html - iOS开发中怎么在自己的webview中实现微信公众号文章中的点击图片查看大图功能?

巴扎黑巴扎黑2765 days ago439

reply all(4)I'll reply

  • 迷茫

    迷茫2017-04-18 09:34:44

    After the web page is loaded, just add a click event to all img tags

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 09:34:44

    Clicking to enlarge the image in the WeChat public account article uses the native image preview control, not the control on the web page. Add a click event to the image, call the native code and pass the image address. WeChat transfers all the image paths on the page at once, so you can zoom in and slide left and right.
    If you look carefully, you will find that the image preview control is native, and the image will be reloaded after clicking.
    I work on Android, but I don’t know much about iOS. I just know that there is webview-bridge for native and web communication.
    But the principles are the same.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:34:44

    MWPhotoBrowser does it instantly http://blog.csdn.net/u0125922...

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:34:44

    Nonsense, this is the job of the front end. The front end can define a model pop-up box.

    reply
    0
  • Cancelreply