gpt4 book ai didi

iOS:AVCaptureDevicePosition,如何从 SCRecorder 获取(错误:Bad receiver type)

转载 作者:行者123 更新时间:2023-11-29 02:19:59 29 4
gpt4 key购买 nike

我有一些代码,在 objective-c 中,如下所示:

@interface SCRecorderPViewController () {
SCRecorder *_recorder;
UIImage *_photo;
SCRecordSession *_recordSession;
UIImageView *_ghostImageView;
CGFloat screenWidth;
CGFloat screenHeight;

}

而且我想获取事件设备/相机(无论是前面的还是后面的),如下所示:

AVCaptureDevicePosition position = [[_recorder device] position];

但我得到一个错误:Bad receiver type 'AVCaptureDevicePosition' (aka 'enum AVCaptureDevicePosition')

我做错了什么?

谢谢!

克里斯

最佳答案

这应该有效:

AVCaptureDevicePosition position = [_recorder device];

请注意在源文件中。

/**
Change the current used device
*/

@property (assign, nonatomic) AVCaptureDevicePosition device;

关于iOS:AVCaptureDevicePosition,如何从 SCRecorder 获取(错误:Bad receiver type),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28264644/

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