简体   繁体   中英

Put another view above self.imagePickerController.cameraOverlayView?

I want to customize new camera overlay view, so need figure out one way to put new view above self.imagePickerController.cameraOverlayView.

I have tried those ways

[self.view bringSubviewToFront:self.imagePickerController.cameraOverlayView];

[self.imagePickerController.cameraOverlayView bringSubviewToFront:self.view];

[self.view insertSubview:self.view aboveSubview:self.imagePickerController.cameraOverlayView];

But none can work.

Seem that the only way is

self.imagePickerController.showsCameraControls = NO;

Therefore build my own components like iPhone.Camera

I think the idea with the cameraOverlayView is that you use this as a base UIView for anything you'd like to overlay on the camera view. This main overlay view can be transparent, and you just need to place whatever views you want to overlay on the camera as subviews of it.

You can order these subviews however you want within the overlay to achieve the desired visual effects.

Additionally, I recommend watching the WWDC 2010 video session 421 - "Incorporating the Camera and Photo Library in your App", where they go into detail on how to manage camera overlay views. I believe that Apple's PhotoPicker sample application also shows this off.

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