NSAttributedString in swift 5
Solution:
swift 4:
swift 4:
try NSAttributedString(data: Data(utf8), options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: String.Encoding.utf8.rawValue], documentAttributes: nil)
swift 5:
return try NSAttributedString(data: Data(utf8), options: [NSAttributedString.DocumentReadingOptionKey.documentType: String.Encoding.utf8.rawValue], documentAttributes: nil)
Comments
Post a Comment