The Default.png of size 480x320 in landscape mode in iphone - iphone

I am developing an application that is in landscape mode. I have Default.png with size 480x320.
But still when it launches the default image comes in portrait mode not in landscape mode.
However it should come according to the device oreintation.
If i take default.png with same size in allready rotated. then it comes as it was in rotated mode.
However it should come according to the device oreintation.
Please help me

There is an answer to question How to put Default.png in landscape mode? by #brentford that should help you.
There is also an article by John Muchow which outlines a different way one way to accomplish what you want to do.

Taken straight from here
"In iOS 3.2 and later, an iPad application can provide different launch images depending on whether the device is in a portrait or landscape configuration. To specify a launch image for a different orientation, you must add a special modifier string to the base file name of your standard launch image. Thus, the format of each file name becomes the following:
[basename][orientation_modifier][scale_modifier][device_modifier].png"
So in your example you could have:
Default-Landscape.png
Default-Portrait.png
(Default-Landscape#2x.png for iphone 4 and Default-Landscape~ipad.png for ipad and so forth...)
both have to be 320x480 and you'll have to ensure that your app's Info.plist contains all 4 UISupportedOrientation values (UIOrientationPortrait, UIOrientationLandscapeLeft etc etc). But see my above link for a better explanation.

I believe the splashscreen is loaded without checking for orientation.

Try to set UIInterfaceOrientation key in the info.plist file to UIInterfaceOrientationLandscapeLeft (iPhone home button will be on the left) or UIInterfaceOrientationLandscapeRight (home button on right).

See this post:
How do I detect orientation on app launch for splash screen animation on iPad!

Related

iPhone landscape-only no launch image for iOS7 R4 image asset

I'm fairly certain this is a bug, but in case anyone has found a way around this, let me know.
I've set up an asset catalog in Xcode-5 of launch images. If I set an iOS 7 R4 image it is only used if my app supports portrait orientation. My app is landscape-right only and I do not see the launch image.
The iOS 5,6 images work just fine, and the R4 iOS 5,6 image will actually load "correctly" if I leave out the iOS 7 R4 image.
Has anyone been able to get this to work?
Update
I've found that I can get iOS 7 landscape images to appear, but only if I remove the default (iOS6) images, which doesn't really help me. If you edit the info.plist and change the image orientation to "Landscape (right home button)" (for example), then provide a horizontal image, it will actually show it on iOS 7 at launch. Unfortunately, if you include an iOS 6 image, it shows that instead. Also, you will not see the iOS 7 image listed in the "General" tab of your target if the orientation is anything other than Portrait. This is with Xcode 5.0 and iOS 7.0.2.
My Solution is Don't use asset catalogs and provide
Default.png (320x480)
Default#2x.png (640x960)
Default-568h#2x.png (640x1136)
as bundle in project and iOS will automatically found them(Apple doesn't have landscape launch image for iPhone or iPod, so we need to provide rotated 90 degree of landscape image)
You may need
Default-Landscape#2x~ipad.png
Default-Landscape~ipad.png
if you do iPad too.
Don't forget to delete fixed launch images name in your Project-Info.plist if you have
The solution that we have found is to update the asset catalog and target only iOS 6 and Prior.
How to do it. Go to the asset catalog. And on the top right corner click on the 'Attribute Inspector' icon. Here you can set the Target OS for the Launch Images. Uncheck the iOS 7 check boxes for iPhone. Now you should be able to see the launch images for these devices.
Not enough rep to add a comment, so I'll post an answer to clarify a couple of things.
I wouldn't recommend remudada's answer as it is a workaround that may not be compatible for future releases, and, it does contain that black border problem. Generally warning are there for a reason.
NAlexN's answer works as it addresses the problem - iOS is looking for a portrait splash screen, but if the portrait button is off - problem. So, keep the portrait button on and add to your viewcontroller the following:
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
I ran into the same problem with my landscape - only application, and here is how I solved it:
Navigate to General tab in your project settings, iPhone Device Orientation section and deselect checkboxes beside Landscape Left and Landscape Right, and select Portrait orientation.
Run the app on iPhone 3.5 or 4 iOS 7 simulator with this settings. The app could crash if you have hardcoded Landscape masks somewhere in your app's view controllers, but it does not matter.
Put checkmarks back for Landscape Left and Landscape Right, but leave Portrait orientation allowed as well. That is you should allow Portrait and both Landscape orientations for iPhone.
I solved it this way:
Go to the project settings and select "Don't use Asset Catalog" in the launch images section. Now you can add the launch images the traditional way. You can still use the asset catalog for the app icons and other images
In XCode 6.1 For IOS 8...Use Launch Image Source as Launch Image...and Replace Launch Screen File from LaunchScreen.Xib to Blank..
Hope this will help........

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

landscape splash screen for iphone apps?

i am developing an app which supports all orientations. i need to launch the splash screen (launching image) in all orientation types. but the project summary have only one field (portrait) to set the Default.png. how will i launch the landscape splash screen on my iphone app.
ipad have some features to setup both the orientations. is their anything like that in iphone,
thank you in advance
iPhone splash screen is only Portrait. iPad has landscape too because iPad home screen auto rotates unlike iPhone's.
In order to achieve such a behavior you can make your first screen identical to the splash screen ( add the same image on the background) . So it will look like a landscaped splash screen while you are loading the resources needed for your app but you can't start the app in landscape mode.
Hope this helps.
Cheers!
Nope, according to HIG, iPhone's default orientation is portrait and launch will do only portrait mode.
Let me quote a special behaviour
From Technical Note TN2244 Launching your iPhone Application in Landscape
Except for launch images used by the iPhone 6 Plus, asset catalogs assume that all iPhone launch images are for the portrait orientation.
Therefore
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).
if you don't do things correctly, you can end up with a blank/white screen
The result is a blank screen during launch as the system cannot find an appropriate launch image.
Unfortunately, the document was last updated 2 years ago.
2015-05-26 Updated for Xcode 6 and iOS 8.

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?

UIInterfaceOrientation for default screen in iphone sdk

I am developing one iphone app, and i want to support all orientations.
The problem is that I want the default.png to be launched in the proper way according to the orientation at start up. Can someone post some method or proper name for default images so that I can rotate it?
Basically there is a landscape "default" image only for iPad. in iPhone you should suplly only one in the main orientation of your app.
anyway, if you want to do that, there is a workaround posted in this question:
Auto-rotate the default application image according to current landscape mode