swift uitextview html image causes crash when copy image is selected after long press
问题 I currently have a UITextView that is displaying an NSAttributedString that contains HTML data with text and images. This data is received via API so images and text are all combined into one HTML string. This is the function that parses the HTML. let htmlData = NSString(string: myString).data(using: String.Encoding.unicode.rawValue); let options = [NSAttributedString.DocumentReadingOptionKey.documentType: NSAttributedString.DocumentType.html]; do{ let text = try NSMutableAttributedString