简体   繁体   中英

Rotating camera view on iOS

I've read few questions here on stack and I'm in a dead-end. I want to have device (iPhone/iPad) camera as a background, to one of my ViewControllers . I'm using Storyboard and UINavigationsViewController , so I'm modyfing a child ViewController . As far as I read, this means that I cannot force this "child" to start in specific orientation (first problem). Secondly, I decided to go with UIImagePickerController , but as I got it right - you cannot rotate this component, right?

So basically my question is where to go from here, to achieve camera view on background no matter what device orientation? It surely can be done, because Vuforia ie has it (and they are using UIImagePickerController with EAGLView).

You have two options to do that task:

1) You can use Eaglview to render the frames of camera device in background. 2) You can use caeagllayer to do the same.

To draw on that layer you have to use drawableproperties and CaTransformationMatrix

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM