iOS: AVCaptureDevicePosition, how to get from SCRecorder (error: Bad receiver type)

iOS: AVCaptureDevicePosition, how to get from SCRecorder (error: Bad receiver type)

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

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

}

而我想获取activedevice/camera(不管是前面的,还是后面的),这样:

AVCaptureDevicePosition position = [[_recorder device] position];

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

我在做什么"wrong"?

谢谢!

克里斯

这应该有效:

AVCaptureDevicePosition position = [_recorder device];

请注意在源文件中。

/**
 Change the current used device
 */

@property (assign, nonatomic) AVCaptureDevicePosition device;