Screen Orientation on IOS weird behaviour

I have been learning Corona Cards IOS using the Single view example and it has now grown into a work in progress app. Now I intend to have this in Landscape mode but it doesnt work properly. I thought it was something I had broken so I created a new project using the Simple View Template, added a touch function to the crate and lo and behold it doesnt work. The view controller is rescaling to fit the new orientation but the button events are still at the old position.

 So what is going on? How do fix this? I have tried removing portrait screen orientations in Xcodes project settings so it only loads in Landscape but buttons still want to be in portrait mode positions, I have fiddled around with the view controller settings and only made it worse.

 I have looked around for documentation for Xcode project settings for things like this can cant find a thing so unless I have missed a very obvious guide for this kind of thing then I could really do with one.

Rob… we are going to need you to file a bug report so we can look at your project.  Please zip up your entire project and use the Report a Bug link at the top.

Rob

I’m using the simple view template that’s provided on your site. You want me to zip my version of that? It was the one on GitHub. Would it also be possible to send me an Xcode project of a landscape orientated app?

We just did that and orientation is working as expected.  But you’ve probably made changes to the project when you tried to lock the orientation making it different than a straight download.

Rob

Didn’t change anything in Xcode.I double checked and created a new project with template. All I did is added a touch function with print command to the crate. All I did exactly is… Create template simple view, add touch listener on crate with print command . Run on iPad. Turn sideways. Now everything scales to fit,(well squashes) and crate will not register touch but I can click where it might be if it was portrait and it registers there where crate isn’t.

You have to limit your orientation in Xcode’s build settings.  CoronaCards does not use the Corona SDK build.settings file, instead you have to go into Xcode and change those things.

Look at these two screenshots:

I have te been using a build settings file. I know they don’t get used, there isn’t a build settings in the simple view template anyway. I have yet again made a completely new project based on simple view template and turned off all portrait modes and it still auto rotates to fill orientation mode. Like its ignored.

After creating the simple view template new project, I see the corona cards framework is highlight red. It builds fine but I also tried replacing it. No difference. I also see “LaunchSceen.xib” and “Main.storyboard” highlighted red in build phases/copy bundle resources. Not sure if that’s anything to do with it. Remember this is a fresh project created using the template provided by Corona.

Ok so I changed universal deployment target to just iPad and not universal and then change the device orientation to just landscape. It shows just landscape, squashed like it would ha e auto rotated that way after portrait. The touch event does not work still. If I change back to portrait the touch event works again. So what’s going on. Is there a landscape project anywhere?

We can’t guess at what you’re doing.  Please zip up your project and file the bug report so we can help.

Rob

You don’t have to guess. I’ve said quIte clearly. Open up your simple view template, add a touch listene function to crate with print function, build and deploy to iPad in landscape. Touch doesn’t work in landscape, only portrait. If you really need this zipped up I can but would be nice if someone there could do exactly what I’ve asked to check. I’ll send it over today.

Rob,

I’m not an iOS developer here, but I’m pretty sure the orientation event is not supported on iOS CoronaCards.  The orientation event comes from the “view controller” which the CoronaView does not have access to.

If that’s the case, it would be rather helpful if there was some information to set it up for landscape. I can’t find anything about setting up screen dimensions for corona cards iOS. Windows phone was a piece of cake compared to this. even if it doesn’t auto rotate, just want a landscape app is its not too much to ask. I did provide the zipped up project last week as a reported bug. Not heard anything yet. For now I’ll just have to design in portrait which is a bit pants.

So no ideas about setting up a Corona Cards IOS project in Landscape? It is possible right?

Not heard anything back from bug report yet

Rob,

I asked someone to test it out here.  Based on their testing, it’s working fine on iOS 8, but appears to be buggy on iOS 7.

What iOS version are you currently testing on?

It might help us narrow down the issue on our end.

I have latest operating system 8.3 on iPad 2.

I tried lots of different settings . Disabled all portrait modes iPad as well. Tested for iPad only, not universal. Tried swapping screen content width and height, forcing view controller different sizes, resizing from nib disabled, etc, totally wasting my time. Sometimes it went portrait, with correct aspect but fitted sideways. I just gave up as it can’t be that hard. Once it stretches though that’s it all touch objects don’t work.

What would be helpful is if someone set up a working landscape only Xcode project that you could send to me to test.

Okay so two weeks on and no ideas, no guides for setting up screens, no bug report feedback and no helpful landscape Xcode template. 

Am i the only one that cant get a landscape orientated project running on iPad? All I have done is used your templates, which for newbies to Xcode like me is all I can do. So if I dont get any resolution to this I will just have to do it all in Xcode without Corona (99% is already)

Rob… we are going to need you to file a bug report so we can look at your project.  Please zip up your entire project and use the Report a Bug link at the top.

Rob