I´m working with a simple UISplitViewController. In my primary view (master) I have an option to take a photo from the camera using UIImagePickerController when user finish taking the photo or hits cancel I received a memory warning from the console. Does anyone has an idea of why this is happening?
Here is how I present the controller:
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
cameraService = [[UIImagePickerController alloc] init];
cameraService.delegate = self;
cameraService.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:cameraService animated:YES completion:NULL];
}
And here is how I dismiss the image picker view:
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage * image
= (UIImage *)[info valueForKeyPath:UIImagePickerControllerOriginalImage]];
[picker dismissViewControllerAnimated:YES completion:nil];
}
Thanks!