我用背景相机控制器截取了叠加图像。但是拍照时后台cameracontroller层隐藏了
代码:
CGRect rect = [previewView bounds];
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
[previewView.layer renderInContext:context];
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(img, nil, nil, nil);