using setup() now
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
973e25034e
commit
59294ebd51
@ -100,9 +100,11 @@ open class SelectorBase: Control, SelectorControlable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Overrides
|
// MARK: - Overrides
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
/// Executed on initialization for this View.
|
|
||||||
open override func initialSetup() {
|
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||||
super.initialSetup()
|
open override func setup() {
|
||||||
|
super.setup()
|
||||||
|
|
||||||
onClick = { control in
|
onClick = { control in
|
||||||
control.toggle()
|
control.toggle()
|
||||||
}
|
}
|
||||||
@ -116,14 +118,10 @@ open class SelectorBase: Control, SelectorControlable {
|
|||||||
guard let self else { return "" }
|
guard let self else { return "" }
|
||||||
return !isEnabled ? "" : "Double tap to activate."
|
return !isEnabled ? "" : "Double tap to activate."
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
|
||||||
open override func setup() {
|
|
||||||
super.setup()
|
|
||||||
|
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .button
|
accessibilityTraits = .button
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func updateView() {
|
open override func updateView() {
|
||||||
|
|||||||
@ -157,9 +157,11 @@ open class SelectorItemBase<Selector: SelectorBase>: Control, Errorable, Changea
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Overrides
|
// MARK: - Overrides
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
/// Executed on initialization for this View.
|
|
||||||
open override func initialSetup() {
|
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||||
super.initialSetup()
|
open override func setup() {
|
||||||
|
super.setup()
|
||||||
|
|
||||||
onClick = { [weak self] control in
|
onClick = { [weak self] control in
|
||||||
guard let self, isEnabled else { return }
|
guard let self, isEnabled else { return }
|
||||||
toggle()
|
toggle()
|
||||||
@ -204,12 +206,6 @@ open class SelectorItemBase<Selector: SelectorBase>: Control, Errorable, Changea
|
|||||||
return !isEnabled ? "" : "Double tap to activate."
|
return !isEnabled ? "" : "Double tap to activate."
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
|
||||||
open override func setup() {
|
|
||||||
super.setup()
|
|
||||||
|
|
||||||
selectorView.isAccessibilityElement = true
|
selectorView.isAccessibilityElement = true
|
||||||
isAccessibilityElement = false
|
isAccessibilityElement = false
|
||||||
addSubview(mainStackView)
|
addSubview(mainStackView)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user