I previously posted in a wrong category, so I’m posting again here…
Basically, I’ve been using media.show to let the user select a photo, then I’m saving the photo on my app folder.
It works perfectly on non-iPad devices with this code:
media.show( media.PhotoLibrary, onComplete, {baseDir=system.TemporaryDirectory, filename="screenshot.jpg", type="image"})
Now, when I run it on iPad the popover media selector shows up in the top left of the screen, so I need to add the parameters origin and permittedArrows to put the media selector near the button.
According to the api it should be like this:
media.show( media.PhotoLibrary, listener, file, origin, permittedArrowDirections )
But no matter what, when I add the file parameter, the origin/permittedArrow params stop working and the selector goes back in the top left position.
Also, if the syntax specified in the API is media.show (source, listener, file, origin, perm arrow), why is not following this syntax for the origin param on iPad? This is an example in the api to set the origin parameter:
media.show( media.PhotoLibrary, { listener = sessionComplete, origin = myButton.contentBounds } )
So, is it media.show(source, table of all the parameters?)
Is that a bug or am I doing something wrong? I’ve tried numerous time and can’t figure out how to specify file & origin parameter at the same time.
Thanks again for your help