首页 > 解决方案 > 如何使用 imagepicker 选择 ios 图像并在 Nativescript 中显示

问题描述

我在 Nativescript 中使用 imagepicker https://github.com/NativeScript/nativescript-imagepicker在我的应用程序中选择和显示图像。这在使用 Android 时非常简单,但我不知道如何使用 IOS 来做到这一点。我在网上找到了一些例子,但我假设它们已经过时了,因为它们不起作用。

 this.imagePicker.onSelectSingleTap().then(
            (imageAsset: any) => {

                if (!isAndroid) {
                   // What do I do here?
                }
                if (isAndroid) {
                    this.imgURL = imageAsset.android;

                }
            }
        )

标签: nativescriptphasset

解决方案


推荐阅读