禁用 iPhone 中的图像选择器默认动画
你好 我有以下代码,可以拉起相机并在相机的视图上添加叠加层。在相机出现之前,有一个动画。有没有办法可以删除动画并立即跳转到叠加视图?
//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];
Hi
I have the following code which pulls up the camera 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];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
希望这会有所帮助
隐藏/显示 iPhone 相机光圈/快门动画
Hope this helps
Hide/Show iPhone Camera Iris/Shutter animation