using the module on an ipad #1

Closed
gkellum opened this Issue May 18, 2012 · 2 comments

Projects

None yet

2 participants

@gkellum
gkellum commented May 18, 2012

Hi,

I saw a link to this module on the juce forums, and I had been wanting to add a native iOS image chooser to an iPad app I've been working on for quite some time. So, I dropped everything I was working on and have been trying to get an example using your module up and running for the last few hours.

I tried to create an ImagePicker in response to a button click using a few lines like this:

static ImagePicker imagePicker;
imagePicker.show()

But I got the following error message:

2012-05-17 20:55:25.403 manager[41979:fb03] UIStatusBarStyleBlackTranslucent is not available on this device.
2012-05-17 20:55:25.429 manager[41979:fb03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'On iPad, JuceUIImagePicker must be presented via UIPopoverController'

I wanted to ask you if you have any example code showing how you were creating this class yourself. I started digging around in example code for creating a UIPopoverController, but if you have a working example already, that might save me a lot of time.

Thanks,
Greg

@jacobsologub
Owner

Hi Greg,

I've pushed a preliminary fix for this... I actually wasn't aware that on iPad UIImagePicker(s) should be presented using a popover. For now it presents the image picker in the center of the screen but I'll add another parameter to the ImagePicker::show() method for a arrow position that should be used when showing the popover.

Thanks for spotting that!

-Jacob

@gkellum
gkellum commented May 18, 2012

Hi Jacob,

I just pulled your change, and it looks good.

Thanks a lot for sharing this code!!!

Greg

@gkellum gkellum closed this May 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment