I’m not too sure if it’s just me but I think there is a bug with display.contentWidth. I am on a Mac platform using the latest daily build.
This is how to reproduce it:
-
Create a new blank app for iPad
-
Edit the build.settings file to support more orientations:
supported = { "landscapeLeft", "landscapeRight", "portrait", "portraitUpsideDown" },
- Add the following line of code to main.lua
local test = display.newText( display.contentWidth, display.contentWidth/2, display.contentHeight/2, "Helvetica", 18 )
-
Build the app and copy to iPad
-
Turn on the iPad in portrait mode then rotate to (any) landscape mode.
-
Now this is the trick here, while still maintaining landscape mode, place the iPad flat on the table and start the app! It shows 768
-
Next, kill the app, lift up the iPad so that it is more vertical, run the app again! Now shows 1024! Is it just me? :o
Could anyone else please help confirm this? This is preventing me from shipping.
Thank you very much,
Simon [import]uid: 56623 topic_id: 25487 reply_id: 325487[/import]