How to customise the Camera screen frame?

眉间皱痕 提交于 2019-12-03 22:01:43

You basically have two options. The easiest one is to use the cameraOverlayView property of the UIImagePickerController. This allows you to display a view on top of the camera:

http://developer.apple.com/library/ios/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/occ/instp/UIImagePickerController/cameraOverlayView

If you need something more elaborate you can use the AVFoundation framework. In short, it will allow you to display the camera stream anywhere you want in a view: http://developer.apple.com/library/IOS/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW2

Here is a simple tutorial on how to take a picture with AVFoundation: http://www.musicalgeometry.com/?p=1297

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!