开发者

Draw a cross at center of a UIImagePickerController

开发者 https://www.devze.com 2023-01-02 23:26 出处:网络
I\'m very new on iPhone development. I\'m trying to draw a cross over the image obtained from camera.

I'm very new on iPhone development. I'm trying to draw a cross over the image obtained from camera.

I'm using a c开发者_JAVA技巧ustom ViewController that inherits from UIImagePickerController.

When I star the application, I see the cross, but a few seconds after the cross disappears.

Should I use cameraOverlayView?

Thank you


UIImagePickerController is not designed to be subclassed. Do so at your own risk.

In OS 3.1, cameraOverlayView is the approved way of drawing over the camera view. Note that if you set an overlay view, the autofocus controls no longer seem to work.

EDIT: Turns out I'm just paraphrasing the docs:

Important: The UIImagePickerController class supports portrait mode only. This class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified, with one exception. In iPhone OS 3.1 and later, you can assign a custom view to the cameraOverlayView property and use that view to present additional information or manage the interactions between the camera interface and your code.

0

精彩评论

暂无评论...
验证码 换一张
取 消