react-native - 如何在活动视图控制器(ActionSheetIOS.showActionSheetWithOptions)上显示“保存图像”?
问题描述
我想通过ActivityViewController
iOS 模拟器(iPhone X - 12.1)保存图像。
我使用ActionSheetIOS.showShareActionSheetWithOptions
react-native API,但 ActivityViewController 中没有出现“保存图像”。
NSPhotoLibraryUsageDescription
并且NSPhotoLibraryAddUsageDescription
已经设置在Info.plist
.
<View style={styles.isCenter}>
<Button
title="save"
onPress={Platform.OS === 'ios'
? () => ActionSheetIOS.showShareActionSheetWithOptions(
{ url: 'https://facebook.github.io/react-native/img/header_logo.png' },
() => {},
() => console.tron.log('success.'),
) : () => {
// abbreviation for android
}
}
/>
</View>
解决方案
推荐阅读
- python - 设置 QTreeWidget 等于列宽
- docker - Docker 检查不适用于 Jenkins 管道中的某些图像
- php - 使用未定义的常量页面 - 假定为“页面”(这将在 PHP 的未来版本中引发错误)
- reactjs - “ReactInstance”类型上不存在属性“selectionStart”。“组件”类型上不存在属性“selectionStart”
'.ts - r - 如何在 R 函数之间传递参数?
- r - 错误:变量名限制为 10000 字节
- javascript - 样式化组件仅将一些值传递给自定义组件
- c# - 如果从示例表中读取测试数据,源标签的意义何在?我收到错误“场景大纲...没有定义示例”
- angular - 来自rest api的角度材料数据表
- php - 是否有某种方法可以“欺骗”单个 PHP 脚本,使其认为系统时钟/日期与实际不同?