updated to private methods
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
eb8edd2acd
commit
760433243e
@ -78,7 +78,7 @@ open class Control: UIControl, ViewProtocol, UserInfoable, Clickable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
open func initialSetup() {
|
private func initialSetup() {
|
||||||
if !initialSetupPerformed {
|
if !initialSetupPerformed {
|
||||||
initialSetupPerformed = true
|
initialSetupPerformed = true
|
||||||
shouldUpdateView = false
|
shouldUpdateView = false
|
||||||
|
|||||||
@ -57,7 +57,7 @@ open class View: UIView, ViewProtocol, UserInfoable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
open func initialSetup() {
|
private func initialSetup() {
|
||||||
if !initialSetupPerformed {
|
if !initialSetupPerformed {
|
||||||
initialSetupPerformed = true
|
initialSetupPerformed = true
|
||||||
shouldUpdateView = false
|
shouldUpdateView = false
|
||||||
|
|||||||
@ -97,12 +97,9 @@ open class ButtonBase: UIButton, ViewProtocol, UserInfoable, Clickable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
open func initialSetup() {
|
private func initialSetup() {
|
||||||
if !initialSetupPerformed {
|
if !initialSetupPerformed {
|
||||||
initialSetupPerformed = true
|
initialSetupPerformed = true
|
||||||
backgroundColor = .clear
|
|
||||||
translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
accessibilityCustomActions = []
|
|
||||||
shouldUpdateView = false
|
shouldUpdateView = false
|
||||||
setup()
|
setup()
|
||||||
shouldUpdateView = true
|
shouldUpdateView = true
|
||||||
@ -112,8 +109,9 @@ open class ButtonBase: UIButton, ViewProtocol, UserInfoable, Clickable {
|
|||||||
|
|
||||||
|
|
||||||
open func setup() {
|
open func setup() {
|
||||||
|
backgroundColor = .clear
|
||||||
translatesAutoresizingMaskIntoConstraints = false
|
translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
accessibilityCustomActions = []
|
||||||
titleLabel?.adjustsFontSizeToFitWidth = false
|
titleLabel?.adjustsFontSizeToFitWidth = false
|
||||||
titleLabel?.lineBreakMode = .byTruncatingTail
|
titleLabel?.lineBreakMode = .byTruncatingTail
|
||||||
titleLabel?.numberOfLines = 1
|
titleLabel?.numberOfLines = 1
|
||||||
|
|||||||
@ -192,9 +192,17 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
open func initialSetup() {
|
private func initialSetup() {
|
||||||
if !initialSetupPerformed {
|
if !initialSetupPerformed {
|
||||||
initialSetupPerformed = true
|
initialSetupPerformed = true
|
||||||
|
shouldUpdateView = false
|
||||||
|
setup()
|
||||||
|
shouldUpdateView = true
|
||||||
|
setNeedsUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open func setup() {
|
||||||
//register for ContentSizeChanges
|
//register for ContentSizeChanges
|
||||||
NotificationCenter
|
NotificationCenter
|
||||||
.Publisher(center: .default, name: UIContentSizeCategory.didChangeNotification)
|
.Publisher(center: .default, name: UIContentSizeCategory.didChangeNotification)
|
||||||
@ -209,14 +217,6 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
|||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .staticText
|
accessibilityTraits = .staticText
|
||||||
textAlignment = .left
|
textAlignment = .left
|
||||||
shouldUpdateView = false
|
|
||||||
setup()
|
|
||||||
shouldUpdateView = true
|
|
||||||
setNeedsUpdate()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
open func setup() {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open func reset() {
|
open func reset() {
|
||||||
|
|||||||
@ -98,13 +98,9 @@ open class TextField: UITextField, ViewProtocol, Errorable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
open func initialSetup() {
|
private func initialSetup() {
|
||||||
if !initialSetupPerformed {
|
if !initialSetupPerformed {
|
||||||
initialSetupPerformed = true
|
initialSetupPerformed = true
|
||||||
backgroundColor = .clear
|
|
||||||
translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
|
||||||
clipsToBounds = true
|
|
||||||
shouldUpdateView = false
|
shouldUpdateView = false
|
||||||
setup()
|
setup()
|
||||||
shouldUpdateView = true
|
shouldUpdateView = true
|
||||||
@ -113,6 +109,11 @@ open class TextField: UITextField, ViewProtocol, Errorable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
open func setup() {
|
open func setup() {
|
||||||
|
backgroundColor = .clear
|
||||||
|
translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
||||||
|
clipsToBounds = true
|
||||||
|
|
||||||
let accessView = UIView(frame: .init(origin: .zero, size: .init(width: UIScreen.main.bounds.width, height: 44)))
|
let accessView = UIView(frame: .init(origin: .zero, size: .init(width: UIScreen.main.bounds.width, height: 44)))
|
||||||
accessView.backgroundColor = .white
|
accessView.backgroundColor = .white
|
||||||
accessView.addBorder(side: .top, width: 1, color: .lightGray)
|
accessView.addBorder(side: .top, width: 1, color: .lightGray)
|
||||||
|
|||||||
@ -107,11 +107,9 @@ open class TextView: UITextView, ViewProtocol, Errorable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
open func initialSetup() {
|
private func initialSetup() {
|
||||||
if !initialSetupPerformed {
|
if !initialSetupPerformed {
|
||||||
initialSetupPerformed = true
|
initialSetupPerformed = true
|
||||||
backgroundColor = .clear
|
|
||||||
translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
shouldUpdateView = false
|
shouldUpdateView = false
|
||||||
setup()
|
setup()
|
||||||
shouldUpdateView = true
|
shouldUpdateView = true
|
||||||
@ -120,6 +118,9 @@ open class TextView: UITextView, ViewProtocol, Errorable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
open func setup() {
|
open func setup() {
|
||||||
|
backgroundColor = .clear
|
||||||
|
translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
||||||
let accessView = UIView(frame: .init(origin: .zero, size: .init(width: UIScreen.main.bounds.width, height: 44)))
|
let accessView = UIView(frame: .init(origin: .zero, size: .init(width: UIScreen.main.bounds.width, height: 44)))
|
||||||
accessView.backgroundColor = .white
|
accessView.backgroundColor = .white
|
||||||
accessView.addBorder(side: .top, width: 1, color: .lightGray)
|
accessView.addBorder(side: .top, width: 1, color: .lightGray)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user