Skip to content

Commit 3a69743

Browse files
authored
Merge pull request #1341 from woocommerce/issue/1340-darkmode-add-note
Configure backgrounds for add note view
2 parents a817c3e + 1313d31 commit 3a69743

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

WooCommerce/Classes/ViewRelated/ReusableViews/TextViewTableViewCell.swift

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,32 @@ class TextViewTableViewCell: UITableViewCell {
3131

3232
override func awakeFromNib() {
3333
super.awakeFromNib()
34-
noteTextView.delegate = self
34+
35+
configureBackground()
36+
configureTextView()
37+
3538
noteIconButton.accessibilityTraits = .image
3639
}
3740
}
3841

42+
3943
extension TextViewTableViewCell: UITextViewDelegate {
4044
func textViewDidChange(_ textView: UITextView) {
4145
onTextChange?(noteTextView.text)
4246
}
4347
}
48+
49+
private extension TextViewTableViewCell {
50+
func configureBackground() {
51+
applyDefaultBackgroundStyle()
52+
}
53+
54+
func configureTextView() {
55+
noteTextView.delegate = self
56+
// Overriding the textview user interface style until Dark Mode
57+
// is fully supported
58+
if #available(iOS 13.0, *) {
59+
noteTextView.overrideUserInterfaceStyle = .light
60+
}
61+
}
62+
}

0 commit comments

Comments
 (0)