Installation can be done through npm
:
npm i react-native-scroll-screenshot --save
用于截取大于一屏幕的长图片
import { NativeModules } from 'react-native';
new Promise((resolve, reject) => {
NativeModules.RNScrollScreenshot.takeScreenshot(ref, (error, uri) => {
if (error) reject(error);
resolve(uri);
});
});