如何在照片上添加图像标记

时间:2020-10-02 13:45:12

标签: expo

如何为照片添加图像标记并将其保存在本机反应本地博览会中

async function takePicture(){
    if(camRef){
        const data = await camRef.current.takePictureAsync();
        setCapturedPhoto(data.uri);
        setOpen(true);
    }
}
    
async function savePicture(){
    const asset = await MediaLibrary.createAssetAsync(capturedPhoto)
        .then(()=>{
            lert('Salvo com sucesso!');
        })
        .catch(error => {
          console.log('err', error);
        })
}

0 个答案:

没有答案