2016-09-01 95 views
2

當我像下面那樣設計TouchableOpacity時,在iPhone 6模擬器中出現奇怪的渲染。任何想法爲什麼?邊框半徑有奇怪的邊緣 - 反應本機

樣式:

buttonContainer: { 
    height: 50, 
    borderColor: black, 
    borderRadius: 25, 
    margin: 2, 
    justifyContent: 'center', 
    backgroundColor: coral 
} 

組件:

<TouchableOpacity style={styles.buttonContainer} 
    onPress={this.signIn} 
> 
    <Text style={styles.button}>Sign in</Text> 
</TouchableOpacity> 

enter image description here

+0

聞起來像邊緣導致它?如果你刪除它會發生什麼? – dv3

回答

3

原來的文字有自己的背景顏色。使它透明並固定它。

1

嘗試增加overflow: hidden到您的樣式。或者嘗試刪除邊距。