updated for toggleBottom IF iOS 17
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
2f3759ae90
commit
a349359fdf
@ -183,7 +183,11 @@ open class Toggle: Control, Changeable, FormFieldable {
|
||||
super.setup()
|
||||
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits = .button
|
||||
if #available(iOS 17.0, *) {
|
||||
accessibilityTraits = .toggleButton
|
||||
} else {
|
||||
accessibilityTraits = .button
|
||||
}
|
||||
addSubview(label)
|
||||
addSubview(toggleView)
|
||||
|
||||
|
||||
@ -117,7 +117,11 @@ open class ToggleView: Control, Changeable, FormFieldable {
|
||||
super.setup()
|
||||
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits = .button
|
||||
if #available(iOS 17.0, *) {
|
||||
accessibilityTraits = .toggleButton
|
||||
} else {
|
||||
accessibilityTraits = .button
|
||||
}
|
||||
|
||||
addSubview(toggleView)
|
||||
toggleView.addSubview(knobView)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user