I am using the UIImagePickerController in order to let the user select an image in my app by either taking a new pic or selecting an image from the gallery. Using gallery, the app works fine. But if I use the camera as a source, the app uses up a lot of memory and eventually gets killed after becoming terribly slow.
Can someone please tell me the optimum way to use UIImagePickerControllerSourceTypeCamera.
This is the code I am using
if(![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
return;
picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
[[self navigationController] presentModalViewController:picker animated:YES];
[picker release];