iPhone sdk - 使用自定义相机 [英] iPhone sdk - Use a custom camera
问题描述
我正在开发一个需要连续拍摄两张照片的应用程序。我目前使用的是iPhone相机,但是:
I'm developing an app that needs to take two pictures in a row. I'm currently using the iPhone camera but :
- 我想在左下角没有取消
按钮 - 我想不要预览我的图片(使用蓝色
按钮使用)。
我该怎么办?我应该自己做相机吗?我找不到一个简单的教程为自定义相机只有一个拍照按钮...
What should I do ? Should I make my own camera ? I couldn't find an easy tutorial for a custom camera with only a "take picture" button...
推荐答案
方法是使用UIImagePickerController与 showsCameraControls
设置为NO和自定义视图设置在 cameraOverlayView
;这个视图可以有你需要的任何按钮。当触摸时,按钮应该在图像选择器上调用 takePicture
,完成后只需使用 dismissModalViewControllerAnimated:
关闭选取器。
The easiest way to do it is to use UIImagePickerController with showsCameraControls
set to NO and a custom view set in cameraOverlayView
; this view can have whatever buttons you need on it. When touched, the button should call takePicture
on the image picker, and when you're done just use dismissModalViewControllerAnimated:
to dismiss the picker.
这篇关于iPhone sdk - 使用自定义相机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!