• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

View based application is not scalling full screen on iPhone 5

New Here ,
Mar 31, 2014 Mar 31, 2014

Copy link to clipboard

Copied

Hi,

I am new to Flash builder (flex) development for ios, when I created my first "View-Based" application and ran it in the iOs simulator iPhone 4" Retina, it would not fit completely, I can see some empty space at the top and the bottom..... 

Any help guys!!

Thanks,

Views

854

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Apr 11, 2014 Apr 11, 2014

You need to add a startup splash screen image that is the size of the iPhone 5 screen. You may have to google for more detail, I don't have it handy. But this is how the iOS device knows what the useable screen size is. Then your app will fill the screen properly.

::Jason

Votes

Translate

Translate
Explorer ,
Apr 11, 2014 Apr 11, 2014

Copy link to clipboard

Copied

You need to add a startup splash screen image that is the size of the iPhone 5 screen. You may have to google for more detail, I don't have it handy. But this is how the iOS device knows what the useable screen size is. Then your app will fill the screen properly.

::Jason

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 15, 2014 Apr 15, 2014

Copy link to clipboard

Copied

LATEST

Here's some rough code that might be of use, mainly for Apple units as the others vary so much.

I use the dpi to determine which device it's running on and force the full screen (fs) values from that.

It's not pretty but it works.

On a side note, I use the divider/multiplier values for virtual measures.

Ie, if I have a button that is 60x60 pixels on a computer screen (72 to 96 dpi, I use 92) I can then divide/multiply the button size so that it is the same physical size no matter the device dpi (so the button isn't too small for my finger on mobile devices).

S.device.dpi = flash.system.Capabilities.screenDPI

S.device.divider = 92 / S.device.dpi

S.device.multiplier = S.device.dpi / 92

if(S.device.dpi == 264){                                       

    //iPad 3+4

    S.device.width.fs = 1536;   

    S.device.height.fs = 2048;

} else if(S.device.dpi == 132){                                   

    //iPad 1+2

    S.device.width.fs = 768;   

    S.device.height.fs = 1024;

} else if(S.device.dpi == 326){

    if(this.stage.stageHeight/this.stage.stageWidth > 1.6){       

        //iPhone 5

        S.device.width.fs = 640;   

        S.device.height.fs = 1136;

    } else {

        //iPhone 4

        S.device.width.fs = 640;   

        S.device.height.fs = 960;

    }

} else {   

     //Others, ie Android etc

    S.device.width.fs = Math.min(this.stage.stageWidth, Screen.mainScreen.visibleBounds.width);   

    S.device.height.fs = Math.min(this.stage.stageHeight, Screen.mainScreen.visibleBounds.height);

}

Hope this helps.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines