Przeglądaj źródła

auto commit

app
jfinn 3 lat temu
rodzic
commit
1567867f7a
1 zmienionych plików z 33 dodań i 0 usunięć
  1. 33
    0
      mdev/rn_vshot.native.js

+ 33
- 0
mdev/rn_vshot.native.js Wyświetl plik

@@ -0,0 +1,33 @@
1
+import ViewShot,{ captureScreen,captureRef }  from "react-native-view-shot";
2
+// import { captureScreen,captureRef } from "react-native-view-shot";
3
+
4
+
5
+
6
+
7
+
8
+class ExampleCaptureOnMountManually extends Component {
9
+  componentDidMount () {
10
+    this.refs.viewShot.capture().then(uri => {
11
+      console.log("do something with ", uri);
12
+    });
13
+  }
14
+  render() {
15
+    return (
16
+      <ViewShot ref="viewShot" options={{ format: "jpg", quality: 0.9 }}>
17
+        <Text>...Something to rasterize...</Text>
18
+      </ViewShot>
19
+    );
20
+  }
21
+}
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+export {ExampleCaptureOnMountManually}

Ładowanie…
Anuluj
Zapisz