Welcome to Part 3 of my blog series about game development.
Today I’m adding the app icons and a splash screen. I’ll use an asset catalog for that. If you haven’t completed part 2, you can download the project from GitHub: v0.2.1
First of all let’s hide the annoying header bar:
You have to add to entries in the plist file: “Supporting Files/MyFirstGame-Info.plist”
- Status bar is initially hidden = Yes: Hides the status bar at application start and in the splash screen
- View controller-based status bar appearance = No: Prevents that the view controller classes show the status bar
Create AppIcons and SplashScreen Icons with an AssetCatalog
Why an Asset Catalog? That’s easy: If you compile you App for iOS 7, the images are stored in a binary. The advantage of this approach is a faster application start and also a smaller IPA file size which speeds up the download of your App. It is also much easier to manage your images. You must no longer follow strange naming conventions like “image@2.png” for retina and “image.png” for non retina devices or even more confusing “Default-568h@2x.png” for iPhone 5 and “Default@2x.png” for iPhone 4(s) splash screen.
If we limit our App to iOS 7 capable devices we need 15 different images sizes. 9 for the App Icon and 6 for SplashScreens. That sounds much, but comparing to Android devices with much more different screen resolutions, this is incredible easy.
Create the images and open the Asset Catalog:
Drag the images into the Asset Catalog:
Unfortunately the current version of XCode contains a Bug. The splash screen stays black, if we support only the landscape screen orientation on iOS 7 phones: (iPhone landscape-only no launch image for iOS7 R4 image asset):
You can either wait until Apple fixes this issue or solve it using this workaround:
Go to the project settings and select “Don’t use Asset Catalog” in the launch images section. Now we can add the launch images the traditional way. I’ll still use the asset catalog for the app icons and other images.
That’s all for today
Cheers, Stefan Download the project from GitHub: v0.3