如何在iOS相机中添加其他图像或动画

时间:2014-01-10 06:40:59

标签: ios iphone animation scene

就像Häagen-Dazs '应用程序一样,我认为它只是在照片 iPhone 拍摄之前添加动画。我检查了UIImagePickerController,但没有说明如何在图像之前添加其他图片或动画。我只是想在我正在拍摄的场景前添加一些有趣的东西。有人可以提供任何教程吗?感谢。

2 个答案:

答案 0 :(得分:0)

您可以使用UIImagePickerController类的cameraOverlayView属性添加所需的任何叠加视图。

答案 1 :(得分:0)

将带有此类动画的自定义UIView添加到ImagePickerView

_imagePickerCamera.sourceType = UIImagePickerControllerSourceTypeCamera;
                             _imagePickerCamera.delegate = self;
                             _imagePickerCamera.showsCameraControls = NO;
                             _imagePickerCamera.navigationBarHidden = YES;
                             _imagePickerCamera.toolbarHidden = YES;
                             _imagePickerCamera.wantsFullScreenLayout = YES;

                             //create an overlay view instance
                             OverlayView *overlay = [[OverlayView alloc]
                                                     initWithFrame:self.view.bounds];
                             //set our custom overlay view
                             _imagePickerCamera.cameraOverlayView = overlay;
                             overlay.captureButton.frame = CGRectMake(self.view.frame.size.width/2 - 30, self.view.frame.size.height - 60, 60, 60);
                             [overlay.captureButton addTarget:self action:@selector(captureImageWithButton:) forControlEvents:UIControlEventTouchUpInside];
                             [self performSelector:@selector(presentCameraView) withObject:nil afterDelay:0.0f];