Skip to content

Instantly share code, notes, and snippets.

@dceddia
Created June 15, 2018 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dceddia/d732c8dc82b97bf1164840dd6be69738 to your computer and use it in GitHub Desktop.
Save dceddia/d732c8dc82b97bf1164840dd6be69738 to your computer and use it in GitHub Desktop.
Adding a button to take the picture
render() {
const { photo } = this.state;
return (
<Camera
style={{ flex: 1 }}
type={Camera.Constants.Type.back}
ref={cam => this.camera = cam}>
<TouchableOpacity
style={{ flex: 1 }}
onPress={this.takePicture}/>
</Camera>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment