Screen Orientation on IOS weird behaviour

Hi all,

I have this issue too. When I trying to run simple app in Landscape mode (attached to this post) all graphic has broken scale and touches doesn’t work properly. Please view attached file and try to reply ASAP.

Finally deal with it!

All what you need to do is just swap width and height of CoronaView manually. Here is the code:

\_coronaView.frame = CGRectMake(0, 0, \_coronaView.frame.size.height, \_coronaView.frame.size.width);

I used this solution after swapped width and height in config.lua

This works like a charm for me!

Thank you!

I have the same problem: a landscape game in CoronaCards and it’s actually impossible to show it correctly.

I also tried all sorts of hacks without success.

The same project was working perfectly with Xcode5 years ago, but from Xcode6 the orientation stopped working correctly

for me i cannot lock the screen orientation

here my build setting

settings = { orientation = { default = "portrait", -- Initial launch orientation content = "portrait", -- Locked orientation of the Corona stage, independent of Native UI elements (iOS only) supported = {"portrait" }, -- Table of allowed options for auto-orientation },

and i have ticked in the xcode for portrait only

You have to lock it in Xcode’s interface.

Rob

Hi all,

I have this issue too. When I trying to run simple app in Landscape mode (attached to this post) all graphic has broken scale and touches doesn’t work properly. Please view attached file and try to reply ASAP.

Finally deal with it!

All what you need to do is just swap width and height of CoronaView manually. Here is the code:

\_coronaView.frame = CGRectMake(0, 0, \_coronaView.frame.size.height, \_coronaView.frame.size.width);

I used this solution after swapped width and height in config.lua

This works like a charm for me!

Thank you!

I know this is old thread. But I am seeing the exact same behavior still.

- ( **void** )viewDidLoad

{

[ **super** viewDidLoad];

// Do any additional setup after loading the view, typically from a nib.

_coronaController = [[[CoronaViewController alloc] init] autorelease];

[ **self** addChildViewController:_coronaController];

CoronaView *coronaView = (CoronaView *)_coronaController.view;

coronaView.frame = **self** .view.frame;

coronaView.frame = CGRectMake(0, 0, coronaView.frame.size.height, coronaView.frame.size.width);

[ **self** .view addSubview:coronaView];

[coronaView run];

}

I tried doing this, as suggested above, but still no luck ?