changes amde

This commit is contained in:
Kevin G Christiano 2020-04-15 14:03:59 -04:00
parent 9fcf59d9e0
commit b1293ad9ed

View File

@ -161,6 +161,7 @@ import UIKit
@objc public func textViewDidChange(_ textView: UITextView) { @objc public func textViewDidChange(_ textView: UITextView) {
textViewModel?.text = textView.text
proprietorTextDelegate?.textViewDidChange?(textView) proprietorTextDelegate?.textViewDidChange?(textView)
} }
@ -188,7 +189,8 @@ extension TextView: MVMCoreViewProtocol {
insetsLayoutMarginsFromSafeArea = false insetsLayoutMarginsFromSafeArea = false
showsVerticalScrollIndicator = false showsVerticalScrollIndicator = false
showsHorizontalScrollIndicator = false showsHorizontalScrollIndicator = false
backgroundColor = .clear contentInset = UIEdgeInsets(top: Padding.Three, left: Padding.Three, bottom: Padding.Three, right: Padding.Three)
backgroundColor = .mvmWhite
clipsToBounds = true clipsToBounds = true
smartQuotesType = .no smartQuotesType = .no
smartDashesType = .no smartDashesType = .no
@ -212,6 +214,7 @@ extension TextView: MoleculeViewProtocol {
guard let model = model as? TextViewModel else { return } guard let model = model as? TextViewModel else { return }
heightConstraint?.isActive = false
heightConstraint = heightAnchor.constraint(equalToConstant: model.height) heightConstraint = heightAnchor.constraint(equalToConstant: model.height)
heightConstraint?.isActive = true heightConstraint?.isActive = true
@ -238,10 +241,11 @@ extension TextView: MoleculeViewProtocol {
open func reset() { open func reset() {
backgroundColor = .clear backgroundColor = .mvmWhite
text = "" text = ""
inputAccessoryView?.removeFromSuperview() inputAccessoryView?.removeFromSuperview()
layer.borderColor = UIColor.mvmBlack.cgColor layer.borderColor = UIColor.mvmBlack.cgColor
contentInset = UIEdgeInsets(top: Padding.Three, left: Padding.Three, bottom: Padding.Three, right: Padding.Three)
layer.borderWidth = 0 layer.borderWidth = 0
} }
} }