Disable image picker default animation in iphone
Hi I have the following code which pulls up the c开发者_Python百科amera and add an overlay on the camera's view. Before the camera shows up, there is an animation. Is there a way that can remove the animation and jumps to the overlay view right away?
//create an overlay view instance
OverlayView *overlay = [[OverlayView alloc]
initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGTH)];
//create a new image picker instance
UIImagePickerController *picker =
[[UIImagePickerController alloc] init];
//set source to video!
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
//[picker startVideoCapture];
//picker. = 1;
//hide all controls
picker.showsCameraControls = NO;
picker.navigationBarHidden = YES;
picker.toolbarHidden = YES;
//make the video preview full size
picker.wantsFullScreenLayout = YES;
picker.cameraViewTransform =
CGAffineTransformScale(picker.cameraViewTransform,
CAMERA_TRANSFORM_X,
CAMERA_TRANSFORM_Y);
//set our custom overlay view
picker.cameraOverlayView = overlay;
picker.allowsEditing = NO;
//show picker
//[self.view insertSubview:picker.view atIndex:0];
[self presentModalViewController:picker animated:NO];
[self.view bringSubviewToFront:overlay];
Hope this helps
Hide/Show iPhone Camera Iris/Shutter animation
精彩评论