react-native-camera/ViewfinderView.m

21 lines
395 B
Objective-C

#import "ViewfinderView.h"
#import <AVFoundation/AVFoundation.h>
@implementation ViewfinderView
+ (Class)layerClass
{
return [AVCaptureVideoPreviewLayer class];
}
- (AVCaptureSession *)session
{
return [(AVCaptureVideoPreviewLayer *)[self layer] session];
}
- (void)setSession:(AVCaptureSession *)session
{
[(AVCaptureVideoPreviewLayer *)[self layer] setSession:session];
}
@end