Fix text color in dark mode on post view

This commit is contained in:
William Casarin
2023-02-24 15:10:58 -08:00
parent 436d20dfbd
commit e4dd585754

View File

@@ -9,12 +9,12 @@ import SwiftUI
struct TextViewWrapper: UIViewRepresentable { struct TextViewWrapper: UIViewRepresentable {
@Binding var attributedText: NSMutableAttributedString @Binding var attributedText: NSMutableAttributedString
func makeUIView(context: Context) -> UITextView { func makeUIView(context: Context) -> UITextView {
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.black
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