Hi,
I am having trouble with simple local web page using native.showWebPopup (only on iPhone).
First, I am using Corona SDK 2012.799 on Mac.
I have a simple webpage with some centered text and a link (anchor) with an image (next you’ll see the HTML code).
I am also using the <meta name=“viewport” …> tag to comply with mobile web specs.
The web page should show a centered text and an image button (centered) that will take you to http://m.twitter.com/username
When displaying on Android Motorola Milestone (2.2.1), iPad 5.0.1, iPad 2 5.0.1 and iPad 3 5.1 it works as expected as well as the simulator.
On iPhone 4S and 4 with iOS 5.0.1 and 5.1 it does not work well. What happens is that the native.showWebPopup control screen size is bigger than the actual screen size (about twice the size of physical screen) and the html elements are centered around a point which is currently outside of physical screen.
I believe this is a bug with the native.showWebPopup on iPhone as the same code works well with Android and iPad, even the simulator.
I am developing currently with a resolution of 768x1024 on config.lua (see below), how ever, I have tried with 640x960 (real iPhone resolution) to see just in case that could afect, but the same occured.
I have also, tried to use a width of 400 pixels for the native.showWebPopup control and it displays accordingly on Android/iPad but on iPhone, it appears full width and text is centered outside view screen.
Here is the lua code to call the native.showWebPopup
[lua] local url = “html-tw/index.html”
local options = { hasBackground=false, baseUrl=system.ResourceDirectory, urlRequest=urlHandler }
– Open my website in a web view.
native.showWebPopup(0,screenH*0.1,screenW,(screenH*0.9), url, options )[/lua]
Here is the html code:
<title>Twitter DCM</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="styles.css" type="text/css" media="screen, projection">
## Andres Maduro
[ ](http://m.twitter.com/andresmaduro)
[/html]
Here is the config.lua
[lua]application =
{
content =
{
width = 640,
height = 960,
scale = “none”,
},
}[/lua]
Any help is appreciated, if you need, I can provide a working example.
[import]uid: 120459 topic_id: 25831 reply_id: 325831[/import]