Weird device rotation effect

My iPad app only supports landscape. Here’s my build.settings:

settings = {
orientation = {
default = “landscape”,
supported = { “landscape”, “landscapeLeft”, “landscapeRight”},
}
}

This works, but when I rotate my iPad, the corona scene rotates immediately, but there’s an animated rotation of the “frame” that is lagging behind. This doesn’t happen in the simulator, only on the real device.

What am I missing?

Thanks,

Niels [import]uid: 6795 topic_id: 3801 reply_id: 303801[/import]

Hi
Is there any news on this topic?
I’m trying to don’t show this effect but I can’t find how to do that [import]uid: 141611 topic_id: 3801 reply_id: 115756[/import]

You may want to check out the following link: http://developer.coronalabs.com/code/proper-orientation-rotation-animation.

  • Andrew [import]uid: 109711 topic_id: 3801 reply_id: 115782[/import]

Thanks Andrew but I don’t try to show the effect if not the opposite: I’m trying to not show the effect of “black box” that comes standard on the ipad [import]uid: 141611 topic_id: 3801 reply_id: 115787[/import]

Ah, I understand – you’d like your app to flip immediately from one landscape orientation to the other, without the rotating black frame.

Unfortunately, the rotating black frame is controlled entirely by iOS, not by Corona. The only way I’m aware of to disable it is to tell iOS that your app runs in only one landscape orientation. You would do this in your build.settings file by specifying the supported orientations as either landscapeLeft or landscapeRight, but not both. Unfortunately, there are two challenges/pitfalls with this approach. First, since iOS won’t be rotating the orientation automatically, and neither will Corona, you’ll now be responsible for detecting orientation changes yourself in your code and responding accordingly (i.e., by rotating the entire stage, and potentially flipping the x,y coordinates of touch events). This challenge is not too hard to address. Second, since iOS will not know about the orientation flip, native UI elements will appear upside down for one of the two landscape orientations. Even if you’re not using native UI elements, keep in mind that the swipe gesture to activate the iOS Notification Center will be on the bottom, not the top, which may throw off any of your users who use that feature.

Said differently, I’m not aware of any way to have the iOS native UI elements be oriented appropriately for multiple orientations, and yet at the same time avoid the rotating black frame.

As a result, for my own project, I decided to use a solution similar to the link I posted above and rotate the Corona stage in sync with the black frame, so that the difference is not noticeable.

  • Andrew [import]uid: 109711 topic_id: 3801 reply_id: 115866[/import]

Thanks again Andrew, but lock the app orientation is not a valid solution because if I do this it’s possible that Apple don’t approve it.

As you say I can’t eliminate this black frame with Corona… :frowning:

[import]uid: 141611 topic_id: 3801 reply_id: 115878[/import]