Er.Shreyansh Shah
Er.Shreyansh Shah

Reputation: 1482

Orientation issue in iOS 7.1 or iPhone landscape

I am developing an app support iOS 6.0 and up and only in landscape mode for both device.

I have an issue in splash screen/launch screen for landscape mode, I have used 2 approach but didn't work properly.

Approach 1: When I use Images.xcassets to set Launch images. It work fine in iPad device of any OS but don't work in iPhone device as specially in 4" screen phones and 4.7" screen phones.

I have attached image of Images.xcassets as below:

Images.xcassets

Approach 2 Now because of above problem, I have used lauchscreen.xib for iPhone and iPad. Now problem is, when i use this approach, Splash screen display as a portrait mode rather than landscape in iOS 7.1 only.

Supported Device Orientation:

Device orientation

Upvotes: 2

Views: 307

Answers (2)

Er.Shreyansh Shah
Er.Shreyansh Shah

Reputation: 1482

I was shock when I read this and heard about it..

Till iOS 7, Apple don't support Landscape mode for iPhone and iPod. Apple supports Landscape mode only for iPad.

So what if we develop app and give support from iOS 6 / iOS 7?

Solution:- In Images.xcassets, select iPhone for portrait mode and add rotated image with 90 degree.

Let's understand with Step by step process :-

  1. Suppose you have image with 480x320 dimension image.

  2. Open that image in preview(Image editor)/photoshop.

  3. Now rotate that image and save it.

  4. Add rotated image at respective place in Images.xcassets.

  5. Clean Project and run.

Upvotes: 1

Max
Max

Reputation: 5932

Please make sure your orientations are set appropriately. Also please refer this link for more details :- iOS 6: How do I restrict some views to portrait and allow others to rotate?

Screen shot from xcode

Upvotes: 0

Related Questions