Orientation UIImagePickerController

I am creating a UIImagePickerController for a full-screen camera using a custom OverLayView , but when I rotate my device, I get the error " CGAffineTransformInvert: singular matrix. ". As a reference to how I Doing this, I follow this guide: http://blog.blackwhale.at/?p=443

+4
source share
1 answer

Here is the code to rotate the camera overlay image

 cameraOverlayView.transform = CGAffineTransformMakeRotation(-3.141592/2); 

and for scaling:

 cameraController.cameraViewTransform=CGAffineTransformScale(cameraController.cameraViewTransform, 1, 1.25); 
+3
source

Source: https://habr.com/ru/post/1441041/


All Articles