Is it possible to simulate iOS 6 status bar during application launch time (splash screen) in iOS 7? Basically I need to shift down the splash screen in iOS 7 on application launch time so the status bar is on the black background.
I found a solution. You can specify different launch images for iOS 7 that have black line of 40 pixels height at the top (simulating the status bar). To do that, there are 2 possibilities:
1) Using Xcode inside General settings of your app. Specify different launch screens for iOS 7 by specifying "Retina" and "Retina 4-inch" images.
2) Using plist. Set UILaunchImages.
From UI Transition Guide:
In iOS 7, an app can use a different launch image depending on which
version of iOS it’s running in. To provide different launch images,
add the UILaunchImages key to the Info.plist file and use a dictionary
to describe each launch image.More information here.
Related
I have an application which works for iOS 7 and 8 and I'm using auto layout so it will be ok on all iPhones. For iOS 7 I need the launch screen file but for iOS 8 I want to hide it.
How can I remove it specifically for iOS 8?
Thanks in advance :)
The launch screen is processed and displayed by iOS before anything else happens. You can't do anything programmatically to affect the launch screen as your code won't run until after the launch screen has been displayed.
So the only thing you can do is take advantage of the xib launch screen support introduced with iOS8, to provide two different launch screens: one for iOS8+ (the xib) and one for iOS7 and lower (the png).
In the HIG it says the following...
In iOS 8 and later, you can create a XIB or storyboard file instead of
a static launch image...
..
If you also need to support earlier versions of iOS, you can continue to supply static launch images in addition to a launch file.
I use an iPhone 6 and I launch Skype and my app.
My app launches in low resolution (seems like non-retina) and Skype launches in high resolution - status bar resolution stays the same as in home menu of iOS, while the status bar in my app seems "bigger".
screenshot
The one on the left (mine) is clearly lower resolution.
What could be causing that ?
Make sure you have Launch Screen or launch Images at correct resolution for iPhone 6 or 6 Plus, otherwise your application will run in 'display zoom' mode. (scaled up version from iPhone 5 or 4...)
See this SO question, you can either :
use a XIB that adapt to different screen resolutions
use XCode Asset catalog 'LaunchImage' image set, and fill the correct sizes
I have a simple out of box app that doesn't use the entire screen when I deploy it on a iphone5s. By default it creates a LaunchScreen.xib. I have not edited this file on purpose.
Black Bars top and bottom
Other answers suggest to add a Default-568h#2x.png launch image, but I am not using a launch image, and I am not sure where to add these. I see a place for this in the Images.xcassets by clicking the + icon and selecting New Launch Image.
Do I need to add a New Launch Image to Images.xcassets? If so what is the point of having a LaunchScreen.xib?
Thanks!
To get the app to display full screen:
As suggested here (https://stackoverflow.com/a/15328339/4347877), you must include a Default-568h#2x.png launch image (for iOS 7 or earlier). Or if your deployment target is iOS 8 or higher, you have the option of using LaunchScreen.xib.
Why Use LaunchScreen.xib?
For iOS 7 and earlier, app developers had to provide separate launch images for all screen sizes, resolutions and orientations their app supported. For universal apps, up to seven images were required: retina and non-retina versions for 3.5-inch iPhones in portrait and for iPads in portrait and landscape; and another retina image for 4-inch iPhones (the iPhone requires no landscape version because apps are always launched from the portrait-only Home screen).
Creating these images is a nuisance. Xcode 6 comes to the rescue by allowing you to specify a storyboard whose initial view controller will then be used as the app’s launch screen.
If you want to add a launch image instead of using LaunchScreen.xib:
Click on your Images.xcassets folder, right-click in the left pane, and select "New Launch Image." Once you have the correct launch image sizes for all devices you would like to support, drag each image to its respective slot (e.g. "Retina HD 5.5" or "iPhone Portrait 2x"). Before Xcode 6 introduced LaunchScreen.xib I used to create my launch image size here: http://www.appiconsizes.com.
Okay the solution I found came from this question. The answer from James Nick Sears actually fixes my problem. This is after adding the Launch Images. It should be noted that launch images using the images.xcasset is the prefered way to do this pre iOS 8.0 and the only way to make your app compatible with devices running iOS 7 and earlier.
I suggest using TiCons to create the icons, the mapping took me longer then it should have to figure out. In xcode you can see the expected image size for each device by selecting the empty image box and looking in the attribute inspector window on right.
But the real kicker is clicking the 'use asset catalog' button on the "App Icons and Launch Images" of your apps settings under the General tab. Once you click Migrate you can select your LaunchImages from the selection menu that resides where the button used to be, after "Launch Images Source". Without doing this your app won't work correctly on pre iOS 8 devices.
For iPhone app which support iOS 6 and iOS 7, we can use single image as launch image for both os versions. But in iPad, iOS 6 version launch image size should be 1024x748 and iOS 7 version launch image size should be 1024x768. Due to separate images, i feel the app size get increased unnecessary. Is there any way to reduce the app size or any way to use a single image for both version of the app?
Any suggestions please...
This will not be best answer to your query (there may be better solution), in iOS7 as application gets full access of screen, splash image size is 1024x768, where in iOS6 access starts after status bar so it's 1024x748.
If you will check option [Hide status bar during application launch] than for iOS 6 splash size will be 1024x768, so you don't need to add any extra image, check attached image to see that option in Target->general settings
I tried removing the status bar from my Default.png images, but under iOS 6 apps seemingly load with that blue-tinted bar, and since my app uses a black one it doesn't work.
For example, the Facebook app on cold launch has a launch image which uses the user's status bar.
The app will not use the status bar from the launch image. In fact, for the iPad launch image, you have to crop out the status bar. For the iPhone launch images, XCode automatically crops them for you.
Set the tint of the status bar during launch in your project summary settings.