Created
December 2, 2012 21:18
-
-
Save goblindegook/4191116 to your computer and use it in GitHub Desktop.
Detect VoiceOver Status Changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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."); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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