Created
July 23, 2014 16:47
-
-
Save augustj/15ead6a7484b02748cd5 to your computer and use it in GitHub Desktop.
Category on UIView to enable accessibility on DEBUG builds for KIF testing
This file contains 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)enableAccessibilityForIdentifier:(NSString *)identifier { | |
//This is only used to help with KIF testing, so we don't need/want them in production | |
#ifdef DEBUG | |
[self setValue:identifier forKey:@"accessibilityIdentifier"]; | |
self.accessibilityLabel = identifier; | |
self.isAccessibilityElement = TRUE; | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment