Skip to content

Instantly share code, notes, and snippets.

@goblindegook
Created December 2, 2012 21:18
Show Gist options
  • Save goblindegook/4191116 to your computer and use it in GitHub Desktop.
Save goblindegook/4191116 to your computer and use it in GitHub Desktop.
Detect VoiceOver Status Changes
- (void)viewDidLoad {
...
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(didChangeVoiceOverStatus:)
name:UIAccessibilityVoiceOverStatusChanged
object:nil];
...
}
- (void)didChangeVoiceOverStatus:(NSNotification *)notification {
if (UIAccessibilityIsVoiceOverRunning()) {
NSLog(@"VoiceOver is ON.");
} else {
NSLog(@"VoiceOver is OFF.");
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
[[NSNotificationCenter defaultCenter] removeObserver:self];
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment