我正在使用React創建iOS應用程序。設計此按鈕時需要幫助
我有兩個按鈕:
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<Button title="Overview" onPress={() => {this.setState({detailsMode: false})}} style={{backgroundColor: '#666'}}/>
<Button title="Detailed" onPress={() => {this.setState({detailsMode: true})}} style={{}}/>
</View>
而且他們看起來像這樣:
我想他們是這樣的:
我試過這個,失敗了y:
<View style={{flex: 1, borderRadius: 10, borderWidth: 0, borderColor: '#A087D1', backgrounColor: 'white', flexDirection: 'row', alignItems: 'center'}}>
<Button style={{ borderTopLeftRadius: 10, borderTopRightRadius: 10}} title="Overview" onPress={() => {this.setState({detailsMode: false})}} style={{backgroundColor: '#666'}}/>
<Button style={{ borderTopLeftRadius: 10, borderTopRightRadius: 10}} title="Detailed" onPress={() => {this.setState({detailsMode: true})}} style={{}}/>
</View>
你能幫我嗎?
React Native是一種使用React爲iOS/Android創建原生移動應用程序的方法。這是你問題的背景嗎? –
@SumnerEvans我對所有人都是新手。但我正在使用反應本機構建IOS應用程序。我有正確的標記嗎? –
您已正確標記。 –