CXTDT-599736 - Unable to turn off the Toggles for Privacy preferences
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
317cf89fb6
commit
f713cc0659
@ -153,19 +153,18 @@ open class Toggle: Control, Changeable, FormFieldable {
|
|||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Overrides
|
// MARK: - Overrides
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
/// Executed on initialization for this View.
|
|
||||||
open override func initialSetup() {
|
|
||||||
super.initialSetup()
|
|
||||||
onClick = { control in
|
|
||||||
control.toggle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||||
open override func setup() {
|
open override func setup() {
|
||||||
super.setup()
|
super.setup()
|
||||||
|
|
||||||
|
publisher(for: .touchUpInside)
|
||||||
|
.sink(receiveValue: { [weak self] _ in
|
||||||
|
guard let self else { return }
|
||||||
|
toggle()
|
||||||
|
})
|
||||||
|
.store(in: &subscribers)
|
||||||
|
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
if #available(iOS 17.0, *) {
|
if #available(iOS 17.0, *) {
|
||||||
accessibilityTraits = .toggleButton
|
accessibilityTraits = .toggleButton
|
||||||
|
|||||||
@ -105,17 +105,16 @@ open class ToggleView: Control, Changeable, FormFieldable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Overrides
|
// MARK: - Overrides
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
/// Executed on initialization for this View.
|
|
||||||
open override func initialSetup() {
|
|
||||||
super.initialSetup()
|
|
||||||
onClick = { control in
|
|
||||||
control.toggle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
|
||||||
open override func setup() {
|
open override func setup() {
|
||||||
super.setup()
|
super.setup()
|
||||||
|
|
||||||
|
publisher(for: .touchUpInside)
|
||||||
|
.sink(receiveValue: { [weak self] _ in
|
||||||
|
guard let self else { return }
|
||||||
|
toggle()
|
||||||
|
})
|
||||||
|
.store(in: &subscribers)
|
||||||
|
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
if #available(iOS 17.0, *) {
|
if #available(iOS 17.0, *) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user