From b1293ad9ed15f2374b2d6ba8c9b38ad5ac229ccf Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Wed, 15 Apr 2020 14:03:59 -0400 Subject: [PATCH] changes amde --- MVMCoreUI/BaseClasses/TextView.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/BaseClasses/TextView.swift b/MVMCoreUI/BaseClasses/TextView.swift index 977dcfe8..1046e327 100644 --- a/MVMCoreUI/BaseClasses/TextView.swift +++ b/MVMCoreUI/BaseClasses/TextView.swift @@ -161,6 +161,7 @@ import UIKit @objc public func textViewDidChange(_ textView: UITextView) { + textViewModel?.text = textView.text proprietorTextDelegate?.textViewDidChange?(textView) } @@ -188,7 +189,8 @@ extension TextView: MVMCoreViewProtocol { insetsLayoutMarginsFromSafeArea = false showsVerticalScrollIndicator = false showsHorizontalScrollIndicator = false - backgroundColor = .clear + contentInset = UIEdgeInsets(top: Padding.Three, left: Padding.Three, bottom: Padding.Three, right: Padding.Three) + backgroundColor = .mvmWhite clipsToBounds = true smartQuotesType = .no smartDashesType = .no @@ -212,6 +214,7 @@ extension TextView: MoleculeViewProtocol { guard let model = model as? TextViewModel else { return } + heightConstraint?.isActive = false heightConstraint = heightAnchor.constraint(equalToConstant: model.height) heightConstraint?.isActive = true @@ -238,10 +241,11 @@ extension TextView: MoleculeViewProtocol { open func reset() { - backgroundColor = .clear + backgroundColor = .mvmWhite text = "" inputAccessoryView?.removeFromSuperview() layer.borderColor = UIColor.mvmBlack.cgColor + contentInset = UIEdgeInsets(top: Padding.Three, left: Padding.Three, bottom: Padding.Three, right: Padding.Three) layer.borderWidth = 0 } }