格式化文本框背景浅色固定白色深色使用次级背景
This commit is contained in:
@@ -34,7 +34,9 @@ class FormatLogViewController: UIViewController {
|
|||||||
textView = UITextView()
|
textView = UITextView()
|
||||||
textView.translatesAutoresizingMaskIntoConstraints = false
|
textView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
textView.font = UIFont.systemFont(ofSize: 16)
|
textView.font = UIFont.systemFont(ofSize: 16)
|
||||||
textView.backgroundColor = .systemBackground
|
textView.backgroundColor = UIColor { traitCollection in
|
||||||
|
traitCollection.userInterfaceStyle == .dark ? .secondarySystemBackground : .white
|
||||||
|
}
|
||||||
textView.layer.cornerRadius = 12
|
textView.layer.cornerRadius = 12
|
||||||
textView.layer.borderWidth = 0.5
|
textView.layer.borderWidth = 0.5
|
||||||
textView.layer.borderColor = UIColor.separator.cgColor
|
textView.layer.borderColor = UIColor.separator.cgColor
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ class FormatNoteViewController: UIViewController {
|
|||||||
private func setupUI() {
|
private func setupUI() {
|
||||||
textView = UITextView()
|
textView = UITextView()
|
||||||
textView.translatesAutoresizingMaskIntoConstraints = false
|
textView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
textView.backgroundColor = .systemBackground
|
textView.backgroundColor = UIColor { traitCollection in
|
||||||
|
traitCollection.userInterfaceStyle == .dark ? .secondarySystemBackground : .white
|
||||||
|
}
|
||||||
textView.layer.cornerRadius = 12
|
textView.layer.cornerRadius = 12
|
||||||
textView.layer.borderWidth = 0.5
|
textView.layer.borderWidth = 0.5
|
||||||
textView.layer.borderColor = UIColor.separator.cgColor
|
textView.layer.borderColor = UIColor.separator.cgColor
|
||||||
|
|||||||
Reference in New Issue
Block a user