How to Position a React Native Button at the bottom of my screen to work on multiple ios devices

前端 未结 3 1629
花落未央
花落未央 2021-02-05 07:59

I am young to react native search the web for tutorials that could help me with this problem but have not find anything. I know how to move the buttons from point A to B on my s

3条回答
  •  没有蜡笔的小新
    2021-02-05 08:45

    You can try the code below at https://facebook.github.io/react-native/docs/flexbox.html until that link doesn't work anymore.

    Basically you are splitting the screen into 3 pieces, top scrollable, and bottom. The code below is just doing 3 views for simplicity (no scrolling, just replace the middle one with a ScrollView to have somethign more useful.

    import React, { Component } from 'react';
    import { AppRegistry, View } from 'react-native';
    
    export default class JustifyContentBasics extends Component {
      render() {
        return (
          // Try setting `justifyContent` to `center`.
          // Try setting `flexDirection` to `row`.
          
            
            
            
          
        );
      }
    

提交回复
热议问题