[React Native] Enable accessibility on RCTText

This commit is contained in:
Alex Akers
2015-05-14 09:38:45 -07:00
parent 711dd6602e
commit e9db0338d2

View File

@@ -25,6 +25,9 @@
if ((self = [super initWithFrame:frame])) {
_textStorage = [[NSTextStorage alloc] init];
self.accessibilityElement = YES;
self.accessibilityTraits |= UIAccessibilityTraitStaticText;
self.opaque = NO;
self.contentMode = UIViewContentModeRedraw;
}
@@ -127,4 +130,11 @@
return reactTag ?: self.reactTag;
}
#pragma mark - Accessibility
- (NSString *)accessibilityLabel
{
return _textStorage.string;
}
@end