From 58c06df8e4204423fb131c400345d4b12595c5d6 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Fri, 8 May 2020 17:41:08 -0400 Subject: [PATCH] removing what isn't needed --- MVMCoreUI/BaseClasses/TextView.swift | 30 ++++++++-------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/MVMCoreUI/BaseClasses/TextView.swift b/MVMCoreUI/BaseClasses/TextView.swift index 208e69bc..eb5bdb7d 100644 --- a/MVMCoreUI/BaseClasses/TextView.swift +++ b/MVMCoreUI/BaseClasses/TextView.swift @@ -40,14 +40,6 @@ import UIKit /// Holds a reference to the delegating class so this class can internally influence the TextField behavior as well. public weak var didDeleteDelegate: TextInputDidDeleteProtocol? - var delegateObject: MVMCoreUIDelegateObject? - - //-------------------------------------------------- - // MARK: - Constraint - //-------------------------------------------------- - - public var heightConstraint: NSLayoutConstraint? - //-------------------------------------------------- // MARK: - Initialization //-------------------------------------------------- @@ -84,20 +76,20 @@ import UIKit } } - open func updateView(_ size: CGFloat) { - - setNeedsDisplay() - } + open func updateView(_ size: CGFloat) { } /// Will be called only once. open func setupView() { translatesAutoresizingMaskIntoConstraints = false - initialConfiguration() + defaultConfiguration() } - public func initialConfiguration() { + public func defaultConfiguration() { + text = "" + placeholder = "" + textAlignment = .left insetsLayoutMarginsFromSafeArea = false showsVerticalScrollIndicator = false showsHorizontalScrollIndicator = false @@ -111,25 +103,19 @@ import UIKit isAccessibilityElement = true accessibilityTraits = .staticText font = Styler.Font.RegularBodyLarge.getFont() + keyboardType = .default isEditable = true isOpaque = false } open func reset() { - text = "" - textAlignment = .left - placeholder = "" fontStyle = Styler.Font.RegularBodyLarge placeholderFontStyle = Styler.Font.RegularMicro placeholderTextColor = .mvmCoolGray3 - font = Styler.Font.RegularBodyLarge.getFont() - keyboardType = .default - isEditable = true isEnabled = true inputAccessoryView?.removeFromSuperview() - inputAccessoryView = nil - initialConfiguration() + defaultConfiguration() } //--------------------------------------------------