I run this code in Swift 5, iOS 12.1:
let linkText = NSMutableAttributedString(string: "this is link", attributes: [.link: NSString(string: "http://example.com")]) textView.attributedText = linkText textView.linkTextAttributes = [.foregroundColor: UIColor.blue, .underlineColor: UIColor.blue, .underlineStyle: NSUnderlineStyle.single]
I get error:
[__SwiftValue integerValue]: unrecognized selector sent to instance 0x600002ba3b10
I don't know what is wrong.