It would be nice if
native.showWebPopup( inUrl,webOptions )
could run inside a window or display that was slightly less than full screen size so there could also be a dismiss button.
At present there is no way (that I have found) for the user to dismiss the web popup when finished and return to the program.
the only alternative is to use native.showWebPopup( url ) to take you to safari
then when the user is done, return to the program which will hopefully be at the same screen
I would prefer screen shifting to dismiss the web popup.
But at present, there is not code way for a user action to trigger system.cancelWebPopup() is there?
William
Download the new beta 4 SDK. You can do it now.
oh? is there an example of this functionality? changing the size of the popup window? i didnt see anywhere in the API how to do it
The new command is native.showWebPopup(x, y, x.size, y.size, "page.html", {baseUrl = system.ResourceDirectory, urlRequest = functionToBeCalled})
in order to cancel the popup, all you have to do is to create a button calling a function that run the native.cancelWebPopup command.
Alex
oh great thanks, is there any way to rotate this window?
Never tried but you can try the following:
1 2 3 4 | local window = display.newGroup() local test = native.showWebPopup(x, y, x.size, y.size, "page.html", {baseUrl = system.ResourceDirectory, urlRequest = functionToBeCalled}) window:insert(test) transition.to(window, {time=150, rotation=90}) |
let me know if it worked.
Alex
didn't work. cant seem to find any way to rotate the webpopup window.
Are you using Beta4 and a build.settings file?
yes
I am running into the same issue. If anyone has a work around for this at present it would be greatly appreciated, thanks!