search

Home  >  Q&A  >  body text

iOS development: UILabel recognizes HTML tags

iOS development: UILabel recognizes HTML tags. The html returned in the background contains not only text but also image link addresses. How can I display the html as normal text and images?

習慣沉默習慣沉默2788 days ago657

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-02 09:38:23

    If you load it as a web page, you can use UIWebView to load it.

    If you parse it yourself, for example, the background returns data in JSON format, you need to get the image and text fields inside, and then the image address can be directly loaded and displayed using the third-party framework SDWebImage.

    Hope it helps.

    reply
    0
  • Cancelreply