UIImagePickerController.overlayView
您可能要设置一个属性:
// Create a new image picker instance:
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
// Set the image picker source:
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
// Hide the controls:
picker.showsCameraControls = NO;
picker.navigationBarHidden = YES;
// Make camera view full screen:
picker.wantsFullScreenLayout = YES;
picker.cameraViewTransform = CGAffineTransformScale(picker.cameraViewTransform, 1, 1.12412);
// Create an overlay view
// this might need to either 1) be transparent, or 2) be of the other dimensions
OverlayView *overlay = [[OverlayView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height)];
// Insert the overlay:
picker.cameraOverlayView = overlay;