4

I am using a LaunchScreen.xib to start my app. This xib must works in portrait mode (only!). Anyone knows how can I achieve that with an iPhone 6/6s Plus (they can start the app in landscape)?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Tiago Pereira
  • 592
  • 1
  • 4
  • 19

2 Answers2

0

I believe if you open the Attributes Inspector for the assets catalog then you need check the landscape box like imageenter image description here

Hope my solution help you to resolved your issue.

Cuong Nguyen
  • 980
  • 2
  • 9
  • 29
  • Hi @Cuong Nguyen, thanks for the reply but I can't use Assets Catalog in my project. I'm using a single xib that can be defined in the project's main target (general settings) and in the info.plist – Tiago Pereira Nov 13 '15 at 17:40
  • Hi guy. If you using file .xib and info.plist. Try it info.plist https://gist.github.com/cuong-nguyen-ta/5822e74c8d029bdcc73f – Cuong Nguyen Nov 13 '15 at 17:48
0

From the Documentation:

Launch Images

Launch images for iPhone apps are always sized to match the dimensions of the screen in portrait orientation. For applications that launch into landscape orientation, you should use your preferred graphics editing software to rotate the content of the launch image while keeping the image's size consistent with a portrait launch image (height > width).

Avoid using asset catalogs to manage the launch images of landscape applications. Except for launch images used by the iPhone 6 Plus, asset catalogs assume that all iPhone launch images are for the portrait orientation. When your application is compiled, entries for each launch image are added to the compiled information property list under the UILaunchImages key. The value for the UILaunchImageOrientation key in each of these entries is always Portrait. These entries are then ignored at launch time because the value of Portrait for the UILaunchImageOrientation key does not match the launch orientation (Landscape Left or Landscape Right). The result is a blank screen during launch as the system cannot find an appropriate launch image.

Instead, you should use a Launch File if your application only supports iOS 8 and above. Otherwise, you will need to add your launch images as resources to your project and then add the UILaunchImages key to your application's information property list. Be sure to disable use of the asset catalog for managing the launch images by selecting 'Don't use asset catalogs' from the Launch Image Source menu under the General tab of the project editor for your applications' target.

For more info:

If you are not using assets, use UILaunchImages key to make changes to the launchscreenimage in your application's information property list and then edit the value under each UILaunchImageName key to match the corresponding image from your project. Do not include the extension or any modifiers (@2x, @3x). You can edit your information property list by control+clicking on it in the File Navigator and choosing Open As > Source Code from the popup menu.

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109