Reputation: 1327
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.
Upvotes: 2
Views: 1263
Reputation: 451
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!
Upvotes: 0
Reputation: 428
you can use AVCamCaptureManager to get overlay which cover just the part of the screen that shows what will be captured by the camera only , not buttons
Upvotes: 6