iOS 18 上 PHPickerViewController 全屏且无法选择项目

问题描述 投票:0回答:1

我正在使用 image_picker 包在我的 Flutter iOS 应用程序中选择照片。它工作正常,但看起来像屏幕截图。无法选择或取消它。这是我的代码:

        final imagePicker = ImagePicker();
        final image = await imagePicker.pickImage(source: ImageSource.gallery);
       

我尝试以自己的方式展示PHPickerViewController

                    case "showImagePicker":
                        var config = PHPickerConfiguration(photoLibrary: .shared())
                        config.selectionLimit = 1
                        config.filter = PHPickerFilter.images
                        let phPicker = PHPickerViewController(configuration: config)
                        phPicker.delegate = self
                        self.window?.rootViewController?.present(phPicker, animated: true, completion: nil)

结果是一样的。呈现一个简单的 UIViewController 就可以了。

                        
                        let phPicker = UIViewController()
                        phPicker.view.backgroundColor = UIColor.red
                        self.window?.rootViewController?.present(phPicker, animated: true, completion: nil)

现在我很困惑。

flutter ios18 flutter-image-picker phpickerviewcontroller
1个回答
0
投票

iOS 18 模拟器(Rosseta)上有一个bug

© www.soinside.com 2019 - 2024. All rights reserved.