NSAttributedString in swift 5
Solution:
swift 4:
swift 4:
try NSAttributedString(data: Data(utf8), options: [ NSDocumentTypeDocumentAttribut e: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAtt ribute: String.Encoding.utf8.rawValue] , documentAttributes: nil)
swift 5:
return try NSAttributedString(data: Data(utf8), options: [NSAttributedString.DocumentRe adingOptionKey.documentType: String.Encoding.utf8.rawValue] , documentAttributes: nil)
Comments
Post a Comment