search

Home  >  Q&A  >  body text

ios如何用UITextView或者WebView进行图 文 视频 音频混编?

像网易新闻一样,一篇文章中内嵌有图片,video,以及/或者audio。图片点击后可以放大,video和audio点击后可以播放。

由于服务器的限制以及数据是用json传的,所以只是一串富文本的String,而不是一个html文件或者链接。

大家讲道理大家讲道理2868 days ago782

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:58:49

    Splice it into html by yourself and then load it through UIWebView or WKWebView
    You can go to github to find some third-party practice projects of Zhihu Daily to see its detailed page implementation

    Then it is through the interaction between js and iOS to complete some customized functions such as picture clicks.
    This can be done using native methods or using WKWebViewJavascriptBridge as a third party

    Another implementation method is rich text, which can also be implemented by some excellent third parties, but you may encounter some special functions of your own business that will be more difficult to handle

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:58:49

    Hello! I would like to ask if this problem has been solved?

    reply
    0
  • Cancelreply