How to use the react-native-camera.default.constants function in react-native-camera

To help you get started, we’ve selected a few react-native-camera examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github soliury / noder-react-native / src / layouts / QRCode.js View on Github external
return (
        <View style={styles.cameraWrapper}>
          <BarcodeScanner
            onBarCodeRead={this._onBarCodeRead.bind(this)}
            style={styles.camera} />
          { closeIcon }
        </View>
      )
    }

		// for ios
    return (
      <Camera
        ref='camera'
        style={styles.camera}
        aspect={Camera.constants.Aspect.Fill}
        onBarCodeRead={this._onBarCodeRead.bind(this)}>
        <View style={styles.container}>
          <View style={styles.cameraView}>
            <View key='1' style={[styles.borderLeftTop, styles.borderBox]} />
            <View key='2' style={[styles.borderRightTop, styles.borderBox]} />
            <View key='3' style={[styles.borderLeftBottom, styles.borderBox]} />
            <View key='4' style={[styles.borderRightBottom, styles.borderBox]} />
          </View>
          <Text style={styles.infoText}>
						请将二维码放到框内
					</Text>
        </View>
        { closeIcon }
      </Camera>
    )
  }