【发布时间】:2017-12-29 14:08:49
【问题描述】:
我正在处理另一个开发人员的代码,它是一个相机应用程序。在我升级到 xCode 9 之前,我一直在研究它,它运行良好。下面是代码 sn-p
@objc protocol AVCapturePhotoOutputType {
@available(iOS 10.0, *)
var isLensStabilizationDuringBracketedCaptureSupported: Bool {get}
@available(iOS 10.0, *)
var availableRawPhotoPixelFormatTypes: [Int] {get}
@available(iOS 10.0, *)
var isHighResolutionCaptureEnabled: Bool {get
@objc(setHighResolutionCaptureEnabled:) set}
@available(iOS 10.0, *)
var supportedFlashModes: [Int] {get}
@available(iOS 10.0, *)
func connection(withMediaType mediaType: String!) -> AVCaptureConnection!
@available(iOS 10.0, *)
@objc(capturePhotoWithSettings:delegate:)
func capturePhoto(with settings: AVCapturePhotoSettings, delegate:
AVCapturePhotoCaptureDelegate)}
@available(iOS 10.0, *)
extension AVCapturePhotoOutput:AVCapturePhotoOutputType {}
现在我在行扩展 AVCapturePhotoOutput:AVCapturePhotoOutputType {} 上遇到错误,即扩展协议。这是错误
Type 'AVCapturePhotoOutput' does not conform to protocol 'AVCapturePhotoOutputType'
xCode 还提供自动修复选项,当我应用生成两个存根并开始出现错误时,如下图所示。
我不明白为什么在升级到 xCode 9 后会发生这种情况,我们将不胜感激。
【问题讨论】:
标签: ios swift xcode camera avcapturesession