[Resolved] Build 941 - iPhone 5 contentwidth bug

Hi,

I updated to Daily Build 941 to use with the iPhone 5 skin but it still returns the iPhone 4/4S contentWidth and contentHeight values. Does anyone having the same issue? By the way, I’m using the simulator for Windows 7. [import]uid: 191500 topic_id: 32667 reply_id: 332667[/import]

Are you using display.contentHeight and display.contentWidth ?

These will show what ever you have in your config file, no matter what the device is.

Have a look at display.pixelWidth and display.pixelHeight.

More info here -

http://www.coronalabs.com/blog/2012/09/19/faq-wednesday-iphone-5-and-ios-6/

Dave [import]uid: 117617 topic_id: 32667 reply_id: 129875[/import]

Thank you for the help, I wasn’t aware of that so I started using it. Now, the problem is that, I can’t draw a rectangle big as the screen. It works for iPhone 5 but doesn’t work for iPhone 4/4S when my config.lua file is as follows:
[lua]width = 640,
height = 1136,
scale = “letterBox”,
fps = 30,[/lua]

When I change the config.lua file to this:
[lua]width = 640,
height = 960,
scale = “letterBox”,
fps = 30,[/lua]
It works on iPhone 4S but on iPhone 5, it leaves like a 100 pixels area on the left, before drawing the rectangle.
Edit: Sorry, I forgot to paste how I draw the rectangle.
[lua]local rect = display.newRect(0, 0, display.pixelWidth, display.pixelHeight)[/lua]
I also tried pixelHeight as 3rd parameter and pixelWidth as 4th but it didn’t help either. [import]uid: 191500 topic_id: 32667 reply_id: 129878[/import]

Check out @CraftyDeanos comment here and have a look at his config.lua -

https://developer.coronalabs.com/forum/2012/10/25/iphone-5-ipod-touch-5g-tall-mode-doesnt-kick-device#comment-128594

Dave [import]uid: 117617 topic_id: 32667 reply_id: 129884[/import]

That really helped, thank you very much. [import]uid: 191500 topic_id: 32667 reply_id: 129887[/import]

Are you using display.contentHeight and display.contentWidth ?

These will show what ever you have in your config file, no matter what the device is.

Have a look at display.pixelWidth and display.pixelHeight.

More info here -

http://www.coronalabs.com/blog/2012/09/19/faq-wednesday-iphone-5-and-ios-6/

Dave [import]uid: 117617 topic_id: 32667 reply_id: 129875[/import]

Thank you for the help, I wasn’t aware of that so I started using it. Now, the problem is that, I can’t draw a rectangle big as the screen. It works for iPhone 5 but doesn’t work for iPhone 4/4S when my config.lua file is as follows:
[lua]width = 640,
height = 1136,
scale = “letterBox”,
fps = 30,[/lua]

When I change the config.lua file to this:
[lua]width = 640,
height = 960,
scale = “letterBox”,
fps = 30,[/lua]
It works on iPhone 4S but on iPhone 5, it leaves like a 100 pixels area on the left, before drawing the rectangle.
Edit: Sorry, I forgot to paste how I draw the rectangle.
[lua]local rect = display.newRect(0, 0, display.pixelWidth, display.pixelHeight)[/lua]
I also tried pixelHeight as 3rd parameter and pixelWidth as 4th but it didn’t help either. [import]uid: 191500 topic_id: 32667 reply_id: 129878[/import]

Check out @CraftyDeanos comment here and have a look at his config.lua -

https://developer.coronalabs.com/forum/2012/10/25/iphone-5-ipod-touch-5g-tall-mode-doesnt-kick-device#comment-128594

Dave [import]uid: 117617 topic_id: 32667 reply_id: 129884[/import]

That really helped, thank you very much. [import]uid: 191500 topic_id: 32667 reply_id: 129887[/import]