Here we go, my config file settings:
content = { width = 640, height = 960, scale = "letterBox", fps = 60 }
Now this the code I’ve created to simulate an adMob add to be placed at the bottom of the screen, which works fine on all platforms tested (Galaxy S3 {when will we see Galaxy S4 in simulator??}, iPhone 4/5):
local ad\_obj = nil; mock\_ad = function() if ad\_obj ~= nil then ad\_obj:removeSelf(); ad\_obj = nil; end ad\_obj = display.newRect(0,0,display.actualContentWidth,89); ad\_obj:setReferencePoint(display.TopLeftReferencePoint); local adX, adY = display.screenOriginX, display.screenOriginY+display.actualContentHeight-89; ad\_obj.x = adX; ad\_obj.y = adY; end
This code will create a rectangle with the adMob size (for “banner” attribute") and place it at the bottom of the screen no matter what your device is (in simulator and on actual devices).
And these screen shots I’ve attached from different devices would show you what happens when the same location calculation are performed on the different devices, and you can see that on the Galaxy, it’s fine, on the iOS, it look like the reference point for the object is the bottom, not the top:
Galaxy:
iPhone 4S:
iPhone 5: