欢迎访问Ningto's博客

Menu
  • 首页
  • 归档
  • 关于
  • 书签
  • 必应壁纸
  • IT聚合
  • 工具
    • 我的工具列表
    • 我的网盘
    • 必应每日壁纸API
    • Html转Markdown
    • 仙尘光标
Menu

swift UILabel不显示html标签

最后更新 2017-06-10 11:55:14   阅读量 1899

带html标签的文本srcText

var attrStr = NSAttributedString(data: srcText.dataUsingEncoding(NSUnicodeStringEncoding, allowLossyConversion: true)!, options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType], documentAttributes: nil, error: nil)

label.attributedText = attrStr

(转载本站文章请注明作者和出处:泞途 - ningto.com)

下一篇 – App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.
上一篇 – swift UITableView cell自适应高度

  1. Mobile

toningto@outlook.com

推荐文章

beast websocket demo

降权启动应用

标签云

Others Qt Go Web Product Javascript Mobile Linux Database Node.js Tools Design MQ Java Shell Bug Android Mac MongoDB Python C/C++ Tips Windows Life React Boost IOS

推广链接

【腾讯云】云产品限时秒杀,爆款1核2G云服务器,首年99元

多谢支持,用了好几年,服务很稳定支持多设备!

其他

文章RSS

Copyright © 2016 Welcome To Ningto Blog | 鄂ICP备17003086号-2