Как добавить функцию масштабирования и фильтры в AVCaptureVideoPreviewLayer?
{
self.view = [[UIView alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
self.view.backgroundColor = [UIColor blackColor];
AVCaptureVideoPreviewLayer *previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:_captureSession];
previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
previewLayer.frame = self.view.bounds;
[[self.view layer] addSublayer:previewLayer];
[self.view addSubview:[self createOverlay]];
_activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
_activityIndicator.center = self.view.center;
[self.view addSubview:_activityIndicator];
[_activityIndicator startAnimating];
}