简体   繁体   中英

Camera Overlay View on Just Capture Section

I am trying to add a cameraOverlayView on a UIImagePickerController , but I want the overlay to cover just the part of the screen that shows what will be captured by the camera, not the "Cancel" button, take photo button, flash settings, or anything like that. How can I dynamically determine what the frame of the UIImageView of my overlay should be?

I've attached an image to illustrate exactly the section I'm talking about.

在此处输入图片说明

您可以使用AVCamCaptureManager来获取覆盖,该覆盖仅覆盖屏幕的一部分,该部分仅显示相机将捕获的内容,而不显示按钮

i had same situation, what i did, i created an UIImageView like follow:

    myview                 = [[UIImageView alloc]init];
    myview.frame            =  CGRectMake(0, 68, 320, 430);
// note that these frames were as per my needs, you can manipulate them as per yours.

then add this image view as

myImagePicker.cameraOverlayView   = myview;

try this with setting some background color and check whether its covering entire camera part or not, you would just need to set frames, thats all!!!

And yes it does work!

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