gpt4 book ai didi

swift - AVCapturePhotoOutput - Xcode 9 Beta 5 中的更改

转载 作者:可可西里 更新时间:2023-11-01 01:17:56 25 4
gpt4 key购买 nike

刚刚安装了最新的 XCode 版本,它在 AVCapturePhotoOutput 类中提供了一些更改,我想知道如何获取支持闪光灯模式的列表。在以前的版本中,我使用了不再可用的 supportedFlashModes 属性

open var __supportedFlashModes: [NSNumber] { get }

最佳答案

我想新的 Swiftified supportedFlashModes 属性已计划但尚未在 beta 5 中完成。

open var supportedFlashModes: [AVCaptureDevice.FlashMode] { get }

直到我的猜测被证实(可以为负)的那一天,您可以使用__supportedFlashModes。它没有被删除,只是被重命名了。

(一些测试版包含这种正在 build 中的重命名。)

您最好发送错误报告,让 Apple 了解此问题。


编辑似乎 iOS 11 SDK/Xcode 9.1 已经解决了这个问题,Xcode 9.1 beta 的发行说明说:

  • The following AVFoundation API are now available:
    • AVCaptureDevice.Format.supportedColorSpaces
    • AVCaptureDevice.supportedFlashModes
    • AVCapturePhotoOutput.availablePhotoPixelFormatTypes
    • AVCapturePhotoOutput.availableRawPhotoPixelFormatTypes
    • AVCapturePhotoSettings.availablePreviewPhotoPixelFormatTypes

Code which was previously modified to use a double underscore as a workaround should be modified to use these public symbols or the app may be rejected by the App Store.

(添加了粗体。)

关于swift - AVCapturePhotoOutput - Xcode 9 Beta 5 中的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45555134/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com