I hate to admit defeat, and I don’t want to put too much effort into this, so I punted using newWebView() and fell back to using native.showWebPopUp() to solve most of my issues.
Now I’m left with one problem I don’t understand (and you will get code this time!)
config.lua:
if system.getInfo("model") == "iPad" then
application =
{
content =
{
width = 768,
height = 1024,
scale = "letterbox",
},
}
else
application =
{
content =
{
width = 768,
height = 1152,
scale = "letterbox",
},
}
end
All of my backgrounds are setup to have bleeds and are 1152x768. This should let everything I do scale to 768px
In my menu.lua Storyboard based page:
function scene:enterScene( event )
local group = self.view
if storyboard.isNetActive then
native.showWebPopup( 0, 0, 700, 140,
"http://www.technolio.com/banners/bannerIII.html",
{urlRequest=webListener} )
end
end
In bannerIII.html:
[html]
<title>Technolio Banner III</title>
<meta name="viewport" content="width=700px; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<style type="text/css"> <br> html { -webkit-text-size-adjust: none; }<br> body { margin: 0; padding: 0; background-color: black; width: 700px; height: 140px; }<br></style>
[

](itms-apps://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=technolio%20inc)
[/html]
** I have removed a bunch of irrelevant code from the HTML.
On the iPad, the ad shows in the 700x140 box just spiff. If I view it on the iPhone 4, the ad is twice the size it should be.
Now both devices should be on the same scale, just adjusted for the aspect ratio.
I specifically set the width to 700px for the viewport. I specifically set the body to 700px wide and I specifically set the image to 700 pixels and it is natively 700 px wide.
Why am I doubling up on the iPhone?


If I go into Firebug and hit the web page directly, all of my expected sizes are correct.
Any ideas? webview’s should not be sooooo difficult.
Thanks in advance!!!
Rob
EDIT: Oh. my iPad is a new one with a retina display which is why it’s physically twice as big, but… [import]uid: 19626 topic_id: 27015 reply_id: 109925[/import]