react native camera kit is not covering full screen
Issue Description
In my application I'm using react-native-camera-kit it has header and footer space as black for iOS. I want camera to cover the whole screen.
Steps to Reproduce / Code Snippets / Screenshots
<CameraKitCameraScreen
ref={(cam) => (this.camera = cam)}
onBottomButtonPressed={(event) => this.onBottomButtonPressed(event)}
captureButtonImage={images.photoCapture}
showFrame={true}
heightForScannerFrame={height}
offsetForScannerFrame={offset}
scanBarcode={true}
laserColor={'white'}
frameColor={'white'}
colorForScannerFrame={'white'}
cameraOptions={{
flashMode: turnOnFlash ? 'on' : 'off',
}}
onReadCode={(event) =>
this.onBarcodeScan(event.nativeEvent.codeStringValue)
}
/>
Environment
- React Native Navigation version: 3.11.0
- React Native version: 0.59.5
- Platform(s) (iOS, Android, or both?): both
- Device info (Simulator/Device? OS version? Debug/Release?): all iOS devices
Have you try to do it without the
showFrame={true}
?
Have you try to do it without the
showFrame={true}?
Hello @gran33
Yes I've tried that as well but didn't work.
Any updates on this? :)
Did anyone accomplish this? I can't find a way to make it work :(
@sanders-vag
My problem was that I had not set flex: 1. Now, my component looks like this:
<View style={{ flex: 1 }}>
<CameraKitCameraScreen
style={{ flex: 1 }}
scanBarcode={true}
hideControls={true}
onReadCode={onBarcodeScan}
ref={camera}
/>
</View>
Hope this helps!
I have the same the problem, but added this props solve the problem => hideControls
<CameraKitCameraScreen
...
hideControls
...
/>