Question

Just like Häagen-Dazs' App, I think it just add an animation before the photo iPhone is taking. I have checked UIImagePickerController and it didn't say how to add another picture or animation before the image. I just want to add some interesting things in front of the scene that I'm taking. Could anyone provide any tutorial? Thanks.

Était-ce utile?

La solution

add you custom UIView with animation like this into 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];

Autres conseils

You can add any overlay view you want using the cameraOverlayView property of the UIImagePickerController class.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top