123456789101112131415161718192021222324252627282930313233343536 |
- import ViewShot,{ captureScreen,captureRef } from "react-native-view-shot";
- // import { captureScreen,captureRef } from "react-native-view-shot";
- import React, { PureComponent,Component} from 'react';
- import { Header, LoadingIndicator, Text } from '../react/features/base/react';
-
-
-
- class ExampleCaptureOnMountManually extends Component {
- componentDidMount () {
- // captureScreen
- // this.refs.viewShot.capture().then(uri => {
- this.refs.captureScreen.capture().then(uri => {
- console.log("do something with ", uri);
- });
- }
- render() {
- // <ViewShot ref="viewShot" options={{ format: "jpg", quality: 0.9 }}>
- return (
- <ViewShot ref="captureScreen" options={{ format: "jpg", quality: 0.9 }}>
- <Text style={{background:"red"}}>...Something to rasterize...</Text>
- </ViewShot>
- );
- }
- }
-
-
-
-
-
-
-
-
-
-
-
- export {ExampleCaptureOnMountManually}
|