JSImagePickerController icon indicating copy to clipboard operation
JSImagePickerController copied to clipboard

Picker View Appears but all buttons and images are not able to be selected

Open PlasmaSoftUK opened this issue 9 years ago • 12 comments

Hello, I have implemented this in an App I am writing, and I can get the image picker to pop up at the bottom when I want it to. However I am unable to select any buttons or interact with it at all, its as if its disabled. please can you suggest how I might get around this?

If I find a fix in the mean time I will report back.

Kind Regards

Plasma

PlasmaSoftUK avatar Apr 25 '15 19:04 PlasmaSoftUK

Ok so I've fixed a little of it, if I open the Picker with ...

[imagePicker showImagePickerInController:self.view.window.rootViewController animated:YES];

instead of ..

[imagePicker showImagePickerInController:self animated:YES];

I can select an image from the top carousel, I still cannot select "Photo Library" or "Take Photo" from the menu. "Cancel" works, and when I press the other two buttons I see the colour change to reflect being pressed however nothing happens.

PlasmaSoftUK avatar Apr 25 '15 19:04 PlasmaSoftUK

I dug a little further and can now see this when trying to select the Library or Take Photo, still no idea how to fix this at the moment ...

2015-04-25 20:59:38.476 testApp[2505:72175] Library Selected 2015-04-25 20:59:38.661 testApp[2505:72175] Warning: Attempt to present <UIImagePickerController: 0x15089ba00> on <JSImagePickerViewController: 0x14fd562b0> whose view is not in the window hierarchy! 2015-04-25 20:59:47.914 testApp[2505:72175] Photo Selected 2015-04-25 20:59:47.972 testApp[2505:72175] Warning: Attempt to present <UIImagePickerController: 0x1500b1e00> on <JSImagePickerViewController: 0x14fd562b0> whose view is not in the window hierarchy!

PlasmaSoftUK avatar Apr 25 '15 20:04 PlasmaSoftUK

I've created a test app from scratch with the same view hierarchy as my main app. Same problem exists in this one too. I have uploaded the testApp to drop box ..

https://www.dropbox.com/s/1gyxlimlca9qoxq/testApp.zip?dl=0

Hopefully you can help me figure out whats wrong, happy to upload it to anywhere else if it helps.

PlasmaSoftUK avatar Apr 25 '15 21:04 PlasmaSoftUK

Hi, just read all your emails, I'll have a proper look at the code when I get home but could you just explain the navigation stack to me?

Eg. Navigation controller -> push VC -> modal presented -> image picker shown

Jake Sieradzki Sent from my iPhone

On 25 Apr 2015, at 10:25 pm, PlasmaSoftUK [email protected] wrote:

I've created a test app from scratch with the same view hierarchy as my main app. Same problem exists in this one too. I have uploaded the testApp to drop box ..

https://www.dropbox.com/s/1gyxlimlca9qoxq/testApp.zip?dl=0

Hopefully you can help me figure out whats wrong.

— Reply to this email directly or view it on GitHub.

jacobsieradzki avatar Apr 25 '15 21:04 jacobsieradzki

Thanks for the speedy response, the App setup (same as the one I put on drop box) is ..

One main Root UIViewController with an embedded TableView (no navigation controller)

Modal Segue from a Cell on that Table to a 2nd UIViewController which has a UIImage View on it.

This is where I call the picker from

PlasmaSoftUK avatar Apr 25 '15 21:04 PlasmaSoftUK

Just a quick guess from my phone and your emails, iOS is a bit fiddly when it comes to calling a modal segue from a modal segue (the image picker is the 2nd modal segue). Try calling the image picker from your initial view controller just temporarily for a test and see if your problems are fixed then.

On 25 Apr 2015, at 22:41, PlasmaSoftUK [email protected] wrote:

Jake, Thanks for the speedy response, the App setup (same as the one I put on drop box) is ..

One main Root UIViewController with an embedded TableView (no navigation controller)

Modal Segue from a Cell on that Table to a 2nd UIViewController which has a UIImage View on it.

This is where I call the picker from

Kind Regards

Kevin

On 25 Apr 2015, at 22:37, jacobsieradzki [email protected] wrote:

Hi, just read all your emails, I'll have a proper look at the code when I get home but could you just explain the navigation stack to me?

Eg. Navigation controller -> push VC -> modal presented -> image picker shown

Jake Sieradzki Sent from my iPhone

On 25 Apr 2015, at 10:25 pm, PlasmaSoftUK [email protected] wrote:

I've created a test app from scratch with the same view hierarchy as my main app. Same problem exists in this one too. I have uploaded the testApp to drop box ..

https://www.dropbox.com/s/1gyxlimlca9qoxq/testApp.zip?dl=0

Hopefully you can help me figure out whats wrong.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/jacobsieradzki/JSImagePickerController/issues/5#issuecomment-96282724.

jacobsieradzki avatar Apr 25 '15 21:04 jacobsieradzki

Jake, Yes doing it from the first ViewController works just fine, so its definitely something to do with the ..

VC —> Modal VC —> Modal Picker View

Plasma

PlasmaSoftUK avatar Apr 25 '15 22:04 PlasmaSoftUK

Any news on this? Did you have chance to take a look?

Cheers Plasma

PlasmaSoftUK avatar May 06 '15 21:05 PlasmaSoftUK

I'm having the same issue. All buttons unresponsive. I made a quick fix by adding the backgroundView and imagePickerView to the view instead of the window. Not sure if this'll cause other issues, but seems to work for now.

Change:

[self.window addSubview:self.backgroundView];
[self.window addSubview:self.imagePickerView];

To:

[self.view addSubview:self.backgroundView];
[self.view addSubview:self.imagePickerView];

Cheers.

wanderingme avatar May 14 '15 20:05 wanderingme

Unfortunately if I do that the menu doesn't show at all! :( I'd really like to find away to fix this.

PlasmaSoftUK avatar May 16 '15 09:05 PlasmaSoftUK

I take that back, changing "window" to "view" DID work, after I changed the way I present it back to just ..

[imagePicker showImagePickerInController:self animated:YES];

instead of the root view thing that I changed while trying to get it going......

[imagePicker showImagePickerInController:self.view.window.rootViewController animated:YES];

PlasmaSoftUK avatar May 19 '15 21:05 PlasmaSoftUK

Great, that solve my problem too.

urtiaga avatar Jul 30 '15 20:07 urtiaga