1
Android vs iOS에서 테두리 색상과의 동작 차이를 설명하는 문서를 찾지 못하는 것 같습니다. 아래 코드는 iOS에는 좋지만 Android에는 적합하지 않습니다. 안드로이드는 파란색 테두리를 모두 무시하기로 결정합니다.React Native : Android : borderRadius와 다른 테두리 색상
borderRadius
이 제거되면 문제가 해결됩니다. borderRadius가 제거되면
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Modal,
Text,
View
} from 'react-native';
export default class test extends Component {
render() {
return (
<View style={styles.container}>
<View style={[styles.innerContainer, {borderTopColor: 'blue'}]}></View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
padding: 20
},
innerContainer: {
borderRadius: 4,
borderWidth: 1,
borderColor: '#111',
height: 200
},
});
AppRegistry.registerComponent('test',() => test);
해당 클래스는 어디에 적용됩니까? 코드를 보여주십시오. –
게시물을 적절하게 업데이트했습니다. 고맙습니다! –