I have live camera in my app (in scrollView) and for transition I need to take screenshot of camera preview and get that image, but
drawHierarchy(in rect: CGRect,afterScreenUpdates afterUpdates: Bool)
method doesn't help. Is there a way to achieve this without OpenGL. Please help, cause it's already several days I am searching the solution.
UIGraphicsBeginImageContextWithOptions((self.getRectOfSceneInScrollView(index: self.selectedSceneIndex!).size), false, 0);
self.scrollView.drawHierarchy(in: CGRect.init(--some rect--), afterScreenUpdates: true)
let image:UIImage = UIGraphicsGetImageFromCurrentImageContext()!;
UIGraphicsEndImageContext()
UPDATE: self.scrollView.layer.render(in: UIGraphicsGetCurrentContext()!) doesn't help too