@@ -55,6 +55,7 @@ struct UserSearch: View {
|
|||||||
attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18.0),
|
attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18.0),
|
||||||
NSAttributedString.Key.link: "@\(pk)"])
|
NSAttributedString.Key.link: "@\(pk)"])
|
||||||
tagAttributedString.removeAttribute(.link, range: NSRange(location: tagAttributedString.length - 2, length: 2))
|
tagAttributedString.removeAttribute(.link, range: NSRange(location: tagAttributedString.length - 2, length: 2))
|
||||||
|
tagAttributedString.addAttributes([NSAttributedString.Key.foregroundColor: UIColor.label], range: NSRange(location: tagAttributedString.length - 2, length: 2))
|
||||||
let mutableString = NSMutableAttributedString()
|
let mutableString = NSMutableAttributedString()
|
||||||
mutableString.append(post)
|
mutableString.append(post)
|
||||||
mutableString.append(tagAttributedString)
|
mutableString.append(tagAttributedString)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ struct TextViewWrapper: UIViewRepresentable {
|
|||||||
let textView = UITextView()
|
let textView = UITextView()
|
||||||
textView.delegate = context.coordinator
|
textView.delegate = context.coordinator
|
||||||
textView.font = UIFont.systemFont(ofSize: 18)
|
textView.font = UIFont.systemFont(ofSize: 18)
|
||||||
//textView.textColor = UIColor.black
|
textView.textColor = UIColor.label
|
||||||
let linkAttributes: [NSAttributedString.Key : Any] = [
|
let linkAttributes: [NSAttributedString.Key : Any] = [
|
||||||
NSAttributedString.Key.foregroundColor: UIColor(Color.accentColor)]
|
NSAttributedString.Key.foregroundColor: UIColor(Color.accentColor)]
|
||||||
textView.linkTextAttributes = linkAttributes
|
textView.linkTextAttributes = linkAttributes
|
||||||
|
|||||||
Reference in New Issue
Block a user