JSImagePickerController icon indicating copy to clipboard operation
JSImagePickerController copied to clipboard

Problem if called from a navigation controller that is embedded in a navigation controller.

Open igorcarrasco opened this issue 10 years ago • 1 comments

I'm using iPhone 6S with iOS 9.1.

To replicate:

  • Open Demo project,
  • Select main storyboard
  • Select controller,
  • Embed in navigation controller.
  • Embed in Tabbar controller.
  • Run app Only the "recent images" from the horizontal scroll work, take photo and select from library don't work,

igorcarrasco avatar Nov 25 '15 18:11 igorcarrasco

I changed how the UIImagePickerController was presented.

- (void)selectFromLibraryWasPressed
{
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    picker.delegate = self;
    picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    picker.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeImage, nil];

    [self presentViewController:picker animated:YES completion:nil];
}

Subtle change here is to present the picker on self, and not on self.navigationcontroller

edwinbosire avatar Jul 25 '17 11:07 edwinbosire