Link styling

pull/1/head
Michael Kirk 7 years ago
parent 5148747c12
commit 9c9f3875a7

@ -77,6 +77,17 @@ public class LongTextViewController: OWSViewController {
messageTextView.dataDetectorTypes = OWSAllowedDataDetectorTypes
messageTextView.text = messageBody
// RADAR #18669
// https://github.com/lionheart/openradar-mirror/issues/18669
//
// UITextViews linkTextAttributes property has type [String : Any]! but should be [NSAttributedStringKey : Any]! in Swift 4.
let linkTextAttributes: [String: Any] = [
NSAttributedStringKey.foregroundColor.rawValue: Theme.primaryColor,
NSAttributedStringKey.underlineColor.rawValue: Theme.primaryColor,
NSAttributedStringKey.underlineStyle.rawValue: NSUnderlineStyle.styleSingle.rawValue
]
messageTextView.linkTextAttributes = linkTextAttributes
view.addSubview(messageTextView)
messageTextView.autoPinEdge(toSuperviewEdge: .top)
messageTextView.autoPinEdge(toSuperviewMargin: .leading)

Loading…
Cancel
Save