1

Because the default cropping frame of an UIImagePickerController (when using the setting setAllowsEditing:YES) isn't the right size for me I've created a custom view controller, like suggested here.

When a thumbnail is selected from the UIImagePickerController I open this custom view controller (navigationController) from - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info:

[popoverController setContentViewController:navigationController animated:YES];

But it seems that the UIImagePickerController is already closed, because the custom view controller is presented without animation. And when I cancel the custom view controller I can't go back to the UIImagePickerController's thumbnail view. Is there a way to extend the UIImagePickerController so you return to the UIImagePickerController when canceling the custom view controller?

Thanks!

Community
  • 1
  • 1
Marco
  • 330
  • 5
  • 13

1 Answers1

2

UIImagePickerController is a UINavigationController. That means you can push and pop things onto the stack all you want. Instead of setting a new view controller, just push your controller onto the image picker stack.

Randall
  • 14,691
  • 7
  • 40
  • 60
  • Thanks Randall! - I missed that UIImagePickerController inherits from UINavigationController When pushing the custom view controller on the UIImagePickerController's stack the animation is showed and when canceling the view controller by popping it, you return to the previous thumbnail view. – Marco Oct 04 '11 at 12:22