Ipad in landscape mode and iphone in portrait mode - iphone

I need to set Portrait mode when my application is running in a iPhone and in Landscape mode when running in iPad.
I have change in info.plist but i can't set it for iPad or iPhone.

In your project target, go to General, then in the Development Info section follow the attached images:
1-Make sure that your app is set to Universal for the supported devices
2-Chose iPhone and check Portrait.
3-Chose iPad and check Landscape.

In Xcode 9.2 have no option for selecting the orientation for ipad and iphone
but we can able to change it in by info.plist whatever orientation we should need.. its much easy too.
Reference : iPhone portrait-only app starts as landscape on iPad

Check here for iPad:
http://developer.appcelerator.com/question/134746/use-only-portrait-mode-on-ipad
and here for iPhone:
how to support landscape/Portrait orientation only for one UIView
Just a quick google..

Related

Landscape orientation in iPad Pro

I have created a program with a cover image which changes depending on the orientation: it displays a portrait image in portrait mode, and a landscape image in landscape mode. Everything is working fine in every iPhone & iPad simulators, but not in the iPad Pro simulator. Actually, the landscape mode does work, but instead of displaying the landscape cover image, it just adapts the height of the Portrait cover image to the new height in Landscape mode. I don't own an iPad Pro yet, so I don't know if it comes from the iPad Pro or the simulator. Does anyone have encountered this kind of problem? Is there some code to add specifically for iPad Pro?
Without seeing your project, you might need to force your app to use the full screen. In the app target, try checking "Requires Full Screen" is enabled.

Xcode Launch images screens for landscape app

I'm developing universal app (game) which working only in landscape modes. Can I do not specify Launch images for portrait mode for saving size?
Yes, adding "Default-Landscape.png" will be enough, if you need so.
"Universal apps must provide launch images for both the iPhone and iPad idioms".. BUT.. launch images for the iPhone are only accepted in portrait mode (link).
so.. for Default.png or Default-iphone.png .. to provide a landscape launch image you must create the image and rotate it 90 degrees in an image editor

Disable portrait mode on iPad to web app

Is it possible to disable portrait mode on iPad to web app?
I have developed a web app for iPad and iPhone to use css media quires. but I want to run this app only on landscape mode not portrait. So is there any solution how can I disable the portrait mode?
Short answer: No.
Long answer: You can target :landscape and :portrait orientations with media queries, and can alter your design for each circumstance.

Portrait vs Landscape Launch Images

An iPad app can support inclusion of launch images in both orientations; presumably, if your app supports auto-rotation, then this would suggest to me that if the user launches an app while the device is in Landscape mode, then the Landscape launch image is used.
But in all the apps I've built and released, this has never been the case. Never once has the Landscape launch image appeared, only the Portrait. After loading, the app will auto-rotate to whatever orientation the device is in, but at launch, it assumes you are in Portrait. Always.
Why?
I have seen many other apps in the store that behave this way, but then there are some seem to always automatically know immediately at first launch, from that first launch image, that you are in Landscape, if that's the case.
How is this done?
iPhone supports only portrait images (http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW5)
Apps that don't support portrait orientations, provide the same portrait oriented image. For example, Angry birds on iPhone has the same portrait oriented image but the guys painted rotated graphics on it.
As it would turn out, the issue was due to leaving out the supported orientations in the plist file for the app. You can add these manually or just select them in the Target page. More details here:
How to get a landscape launch image to actually appear when launched?

How to change a launching image to landscape?

How to change a launching image to landscape?
I want to set different launching image when device was landscape mode.
so, I made a PNG file (file name : default-LandscapeLeft#2x~iphone.png)
and dragged it in supporting files folder.
and then building and running in device landscape mode.
but I have seen only black screen.
I can't know reason..
I doubt if .plist file was needed to modify..
Please help from advanced guy....
If you are on an iPhone or iPod, and if your app supports both portrait and landscape mode, then iOS always launches it in portrait mode. After it is launched, if the device is in landscape mode, then iOS tells your app to autorotate to landscape mode. This is explained in iOS App Programming Guide: Launching in Landscape Mode.