Skip to main content
Known Participant
Aug 9, 2011 9:34 PM UTC
Question

A few iOS plist questions...

How can I get my app to auto rotate but only in landscape mode?

How can I hide the statud bar of the iPhone (the bar with time, network, wifi etc.)

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Aug 9, 2011 10:14 PM UTC

To hide the status bar simply select full screen under iOS publish settings.

Translate
Participating Frequently
Aug 10, 2011 4:38 AM UTC

Hi,

You should set aspectRatio to landscape, and autoOrients to true in application xml. In your code, you can prevent the default behavior for OrientationChanging event if afterOrientation is "default" or "upsideDown". Try:

stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener);

function orientationChangeListener(e:StageOrientationEvent)
{
  
if (e.afterOrientation == StageOrientation.DEFAULT || e.afterOrientation ==  StageOrientation.UPSIDE_DOWN)
  
{
     e
.preventDefault();
  
}
}

Thanks,
Sanika


Translate
Inspiring
Aug 10, 2011 10:00 AM UTC

However, there is still a bug and therefore it will (on iPhone and iPad) rotate to the portrait view and then automatically jump back to landscape view when changing the orientation, just for a second or so, but enough so it doesn't look like a native app.

Regards,

Josh

Translate
Known Participant
Aug 9, 2011 9:53 PM UTC

well not sure about the auto rotate, im sure if you go to the ios settings then untick auto rotate, then change the stage from 320x480 to 490x 320 then it will only be landscape.

And for the second one it os not possible in flash, only xcode on mac.

Translate