0

I'm very new at iOS and Objective C and I'm trying to design something that it requires to take two consecutive pictures (and save them both) And just learned how to use the camera in iOS 5, so I was wondering how to implement something like that. I need to be able to open the camera, take a picture, save it and then automatically follows with the camera again to take another picture

P.D. I've been using this to use the camera:

- (void) useCamera
{
if ([UIImagePickerController isSourceTypeAvailable:
     UIImagePickerControllerSourceTypeCamera])
{
    UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
    imagePicker.delegate = self;
    imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
    imagePicker.mediaTypes = [NSArray arrayWithObjects:(NSString *) kUTTypeImage,nil];
    imagePicker.allowsEditing = NO;
    [self presentModalViewController:imagePicker animated:YES];        
    newMedia = YES;
}

}
Raicerda
  • 15
  • 4
  • Found a solution! I'm using viewDidAppear:(BOOL)animated so every time that the view shows I can show the camera, so when I stop using the camera, the view shows again and because of viewDidAppear the camera shows again. – Raicerda Oct 17 '12 at 16:53

2 Answers2

0

hint: Use AVCaptureDevice, AVCaptureDeviceInput, AVCaptureStillImageOutput, AVCaptureSession.

koki
  • 352
  • 1
  • 7
0

these 2 links might be helpful. I am fairly new to iOS programing myself but this looks like something promising

How fast can iPhone to be programmed take 2 pictures at one time?

iPhone SDK 4 AVFoundation - How to use captureStillImageAsynchronouslyFromConnection correctly?

Community
  • 1
  • 1
  • actually that is for taking two pictures with one "click" i want to just have twice the camera. like I said before – Raicerda Oct 16 '12 at 14:13