2017-08-31 37 views
2

反応ネイティブのスクリーンショットのようなメニューを作成するにはどうすればよいですか?反応ネイティブのモーダルボトムメニュー

enter image description here

+1

あなたは – Jayasagar

+0

https://github.com/beefe/react-native-actionsheetを試みることができる私はより良いクロスプラットフォームソリューションが見つかりました:https://github.com/beefe/react-native-actionsheet – Tony

答えて

1

あなたはのbackgroundColorを設定することができます。 'RGBA(0,0,0,0.2)' を。

<Modal 
     animationType={"slide"} 
     transparent={false} 
     visible={this.state.modalVisible} 
     onRequestClose={() => {alert("Modal has been closed.")}} 

     > 

    <View style={{flex: 1,backgroundColor: 'rgba(0,0,0,0.2)'}}> 
     <View style ={{flex:1, alignItems: 'center', justifyContent: 'center'}}> 
      <View style={{backgroundColor: '#ffffff', width: 300, height: 300}}> 
       <Text>Hello World!</Text> 
      </View> 
     <TouchableHighlight 
      style={{backgroundColor: '#ffffff', width: 300, height: 40, marginTop: 40}} 
      onPress={() => {this.setModalVisible(!this.state.modalVisible)}} 
     > 
      <Text>Hide Modal</Text> 
     </TouchableHighlight> 

     </View> 
    </View> 
    </Modal> 
+0

をIこのタイプのメニューはiOSのネイティブコンポーネントだと思っていました。これは多くのアプリで見ることができるからです。私が間違っている? – Tony

関連する問題