首页 > 解决方案 > 如何在活动视图控制器(ActionSheetIOS.showActionSheetWithOptions)上显示“保存图像”?

问题描述

我想通过ActivityViewControlleriOS 模拟器(iPhone X - 12.1)保存图像。

我使用ActionSheetIOS.showShareActionSheetWithOptionsreact-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>

标签: react-nativereact-native-ios

解决方案


推荐阅读