Orienting iOS splash image to landscape/portrait according to launch orientation

前端 未结 2 709
故里飘歌
故里飘歌 2020-12-08 12:08

I have an app that can launch in portrait or landscape. I\'d like the Default.png file (the splash image that appears when the app launches) to show the image in the correct

相关标签:
2条回答
  • 2020-12-08 12:52

    You can name your start up images specifically for the orientation and each one will be displayed for that orientation

    1. Default-Portrait.png
    2. Default-PortraitUpsideDown.png
    3. Default-Landscape.png
    4. Default-LandscapeLeft.png
    5. Default-LandscapeRight.png
    0 讨论(0)
  • 2020-12-08 12:58

    See: http://iosdevelopertips.com/ipad/ipad-managing-multiple-launch-images.html

    When loading an application on an iPhone or iPad, a launch image can be shown to provide feedback to the user that the application is loading. On the iPhone one Default.png file was adequate, with the iPad one needs to anticipate the device being started in any orientation, including upside down.

    iPad Launch Image Orientations

    To deal with various orientation options, a new naming convention has been created for iPad launch images. The screen size of the iPad is 768×1024, notice in the dimensions that follow the height takes into account a 20 pixel status bar.

    Filename, Dimensions

    Default-Portrait.png * (768w x 1004h)

    Default-PortraitUpsideDown.png (768w x 1004h)

    Default-Landscape.png ** (1024w x 748h)

    Default-LandscapeLeft.png (1024w x 748h)

    Default-LandscapeRight.png (1024w x 748h)

    Default.png (Not recommended)

    • If you have not specified a Default-PortraitUpsideDown.png file, this file will take precedence.

    • If you have not specified a Default-LandscapeLeft.png or Default-LandscapeRight.png image file, this file will take precedence. Although you can include a Default.png file, and it will be used if no others are specified, I would consider it a best-practice to include all the relevant images needed by your application.

    See also apple.com: https://developer.apple.com/library/content/qa/qa1588/_index.html, "Provide Launch Images".

    Note:

    iPhone-only applications:

    iPhone-only applications may only have one launch image.

    And: (Apple) Providing Launch Images for Different Orientations, (Apple) Launch Image Type

    EDIT 28/06/2014: This answer is from 2011 and as pointed out by @AlexShaffer: "These resolutions listed above are out of date for iOS 7. Launch images for iOS 7 include the status bar area. You should probably also use image catalogs for iOS 7 instead of using images with a naming convention: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/AddingLaunchImagestoanAssetCatalog/AddingLaunchImagestoanAssetCatalog.html"

    0 讨论(0)
提交回复
热议问题