Reputation: 5731
When I style a TouchableOpacity
like below, I get strange rendering in the iPhone 6 simulator. Any idea why?
Styles:
buttonContainer: {
height: 50,
borderColor: black,
borderRadius: 25,
margin: 2,
justifyContent: 'center',
backgroundColor: coral
}
Component:
<TouchableOpacity style={styles.buttonContainer}
onPress={this.signIn}
>
<Text style={styles.button}>Sign in</Text>
</TouchableOpacity>
Upvotes: 2
Views: 2854
Reputation: 5731
Turns out the text had its own background color. Made it transparent and it fixed it.
Upvotes: 3
Reputation: 1108
Try adding overflow: hidden
to your styles. Or try removing the margin.
Upvotes: 1