Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PlasmaSoftUK opened this issue Apr 25, 2015 · 12 comments

Comments

@PlasmaSoftUK
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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.

@jacobsieradzki
Copy link
Owner

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 notifications@github.com 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.

@PlasmaSoftUK
Copy link
Author

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

@jacobsieradzki
Copy link
Owner

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 notifications@github.com 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 notifications@github.com 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 notifications@github.com 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 #5 (comment).

@PlasmaSoftUK
Copy link
Author

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
Copy link
Author

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

Cheers
Plasma

@wanderingme
Copy link

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.

@PlasmaSoftUK
Copy link
Author

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

@PlasmaSoftUK
Copy link
Author

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];

@urtiaga
Copy link

urtiaga commented Jul 30, 2015

Great, that solve my problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants