Is there a way to take a picture on the iPad without going through the Apple controls ? I have seen a bunch of apps that do this,
For example, when you add a new contact in iPhone, on the top left side it shows
What you need to do is , Add a button first, with the title "Add Photo" or with custom image.
Then on the click of the button add the following code :
if (([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera] == NO) return NO; UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init]; cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentViewController: cameraUI animated: YES completion:nil];
It will open up the camera, then you click the image and then tap "use" and You have to implement the UIImagePickerControllerDelegate method imagePickerController:didFinishPickingMediaWithInfo: and then store the UIImage to wherever you want, with whatever file name you want, using NSFileManager methods.