[Text] Ensure that the text background is transparent by default

Summary:
For a very simple view I was observing that the text background was black and had to manually be set to transparent. This ensures that text nodes have a transparent background by default.

Closes https://github.com/facebook/react-native/pull/256
Github Author: James Ide <ide@jameside.com>

Test Plan:
 This example component no longer renders what looks like a black block, and instead displays legible text.

    var Example = React.createClass({
      render: function() {
          return (
            <View style={styles.container}>
              <Text>hello</Text>
            </View>
          );
      },
    });

    var styles = StyleSheet.create({
      container: {
        flex: 1,
      },
    };
This commit is contained in:
James Ide
2015-04-21 19:13:40 -07:00
parent b1a15004de
commit 901c24ebb8

View File

@@ -25,6 +25,7 @@
if ((self = [super initWithFrame:frame])) {
_textStorage = [[NSTextStorage alloc] init];
self.opaque = NO;
self.contentMode = UIViewContentModeRedraw;
}