I am working with a application which has a blue tooth Switch attached to it. With the new iOS 7 Switch Control API I need to check if the iOS 7 Switch Control API is On or not. Is there any API provided to check if the Switch Control is on in the setting ?
Asked
Active
Viewed 274 times
2
-
Please, mark an answer as accepted to let people know that your problem has a solution... iOS 7 is far away now and Justin's answer should do the job. Terima kasih banyak. ;o) – XLE_22 Sep 06 '19 at 09:29
3 Answers
1
Yes, UIAccessibilityIsSwitchControlRunning()
has been available since iOS 8. This API did not exist when your question was first posted.

Justin
- 20,509
- 6
- 47
- 58
0
In Swift 5.0, besides the UIAccessibility.isSwitchControlRunning
state provided by Justin's answer, you can listen to the UIAccessibility.switchControlStatusDidChangeNotification event to be aware of the switch control status modification.

XLE_22
- 5,124
- 3
- 21
- 72