I am trying to remove the image picker from view, without success.
What happens is that at the start i see all user albums, than i pick one and edit the image, than the delegate being called, and i dismiss the controller, but i than see again the albums view, and i just can't remove it from the controller .
Here is how i add it :
pickerLibrary = [[UIImagePickerController alloc] init];
pickerLibrary.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
pickerLibrary.delegate = self;
pickerLibrary.allowsEditing=YES;
pickerLibrary.mediaTypes= [[NSArray alloc] initWithObjects: (NSString *) kUTTypeImage, nil];
[self presentViewController:pickerLibrary animated:YES completion:nil];
And on the delegate i do :
[self dismissViewControllerAnimated:YES completion:^
{
//till here works fine, but than go back to albums page, here i have tried :
[self dismissViewControllerAnimated:YES completion:nil];
[pickerLibrary.view removeFromSuperView];
//or even setting a timer and than try to close it .
}];