You need to ensure that NSMutableAttributedString is initialized in the main thread
DispatchQueue.main.async {
let attributedString = try? NSMutableAttributedString(
data: data,
options: [.documentType: NSAttributedString.DocumentType.html],
documentAttributes: nil
)
// change your ui
}
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: