Orientation issue in iOS 7.1 or iPhone landscape - ios

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:
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:

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 :-
Suppose you have image with 480x320 dimension image.
Open that image in preview(Image editor)/photoshop.
Now rotate that image and save it.
Add rotated image at respective place in Images.xcassets.
Clean Project and run.

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?

Related

Is there a way to ensure iPad Simulator landscape screenshots are rotated correctly?

Most of the iPad apps I develop are used in Landscape mode. The iPad Simulator always starts in Portrait mode; with ⌘+R I rotate it to Landscape mode. In the past (before iOS 13.0 or 13.1), screenshots made with ⌘+S had the correct rotation, but if I make a screenshot right now it's rotated by 90 degrees.
(click to enlarge)
This is how the Mac desktop looks like when I make the screenshot on the Simulator:
Is there a way to stop this behaviour? I've tried the menu option Hardware -> Rotate Device Automatically but that didn't help.
This issue seems to have been fixed with the release of iOS 14 / Xcode 12. Now, when I take a screenshot of my Simulator in Landscape mode, it is saved in Landscape orientation.

IOS 8 iPad make only Launch Screen portrait only

I know how to make an iPad app portrait only for the whole app and how to make particular views portrait only, but not how to make the launch image portrait only. How do I do it?
Currently I only have "portrait" checked under "iOS 7.0 and Later" in images.xcassets. The reason I want the launch image portrait only is I tried getting landscape to work but despite multiple attempts and asking about it here, I had no luck.
Clarification:
I want the app to handle both portrait and landscape iPad and iPhone. But the landscape image for iPad does not display so I want to force the launch image and just the launch image to be Portrait only.
No idea if you checked this but here is something often overlooked.
In the Workspace, if you choose your target project, in Deployment Info, there are two things to check there. First, make sure the Device Orientation is set to "Portrait" only. Then, open the drop down menu on "Devices". Choose each separately and do the same thing. For some reason for me, universal does't apply it to iPhone and iPad simultaneously.

iPad required launch images

I'm developing a universal iOS app that only supports portrait and upside-down interface orientations. When supplying the launch images in Xcode, I see that I have warnings for landscape orientations, even having only portrait and upside down enabled in device orientations settings. Does this mean that I need to supply landscape launch images anyway? I don't find this clear in Apple's documentation.
Thanks
No. These are warnings. Apple would prefer you support all orientations on iPad, and recommend you do, but they do not require it. (Yet)
Launch Images in Landscape Orientation is optional and xCode ignores it if it is not provided in Application.
However, If you are using Xcode5 there will be a folder named Images.xcassets > Launch Images > There will be a blank icon available for iPad Landscape > Right Click on those 1x and 2x icon > Remove Selected Items.
This will remove the warnings that you are having in your case.
Let me know if that helps.
an iPad app includes at least one launch image in portrait
orientation and at least one launch image in landscape orientation.

xcode 5 removing ipad launch images when adding additional sizes

So I have an app and since version 5.0 of Xcode came out I have been trying to get the launch screen images updated. Unfortunately when I try to add either the :
Portrait Retina, Landscape Non Retina, or Landscape Retina it removes whichever one is next to it.
So I will go to add The landscape Retina and the image will appear. However when I go to add the landscape non-retina the Landscape retina image will not longer be referenced.
After adding Non-retina:
Is there a way to double check or add the images without dealing with the interface? Am I doing something wrong? Is it because I haven't added the 1536x2048 yet?

iPhone app on iPad: UILabel, UITextView text pixelated when viewed in 2x

I tried my iPhone app (potrait mode) on iPad Mini just for a test... I noticed that when I tap 2x Mode the text in UILabel, UITextview appears pixelated.
In case of Images I have an option of setting images for both 1x & 2x mode (img1.png & img1#2x.png), but how to do this for text?
I don't want to create images with text for UILabel.
As your app is for iPhone and you are trying to run this in iPad, it is showing like that. If you want it not to be pixeleted, you need iPad version of your app. #2x images are not to make your app compatible with iPad devices but for retina version of same devices.
Hinata is correct. you need to have a sparate iPad App for your Application so that it can run on iPad in full resolution mode. Go through the apple developer documents to know more about how to cerate iPad Application.
By default if you use universal as the build creator while creating your project the App will be supported on ipad's but they will run in 1X or 2X mode.
Let em know if you need more assistance on this.
Regards
Rajeev

Resources