Asset Catalogs in Xcode 5+ are pretty neat. You can keep all of your app's assets in one place, you can see at a glance which image scales you're using, and you can even use asset catalogs for your app's icon and launch image.
When your app first launches, you'll probably have some loading or setup to do before you can display your initial user interface. Instead of showing your user a broken or half-loaded interface, why not animate a smooth transition from your app's launch image to your fully loaded user interface? Unlike normal images in your asset catalog, unfortunately it is not obvious how to reach into your asset catalog to programmatically access the correct launch image for the user's current device.
IFTTTLaunchImage
is a simple set of classes that simplify working with launch images in your asset catalog.
UIImage+IFTTTLaunchImage
andUIDevice+IFTTTLaunchImage
are simple categories that make it easy to access the correct launch image for the user's current device.IFTTTSplashView
is a view containing your launch image that you can display when your app launches. When your app has finished launching and loading its initial interface, the splash view can be dismissed using one of several nifty built-in animations.
Check out Example
for an app that animates from its launch image to its initial interface.
Here it is in action in the Example
app, using the built-in animation IFTTTSplashAnimationDrop
:
To run the example project, clone the repo, and run pod install
from the Example
directory.
IFTTTLaunchImage is available through CocoaPods. To install
it, add the following line to your Podfile
:
pod "IFTTTLaunchImage"
IFTTTLaunchImage is available under the MIT license. See the LICENSE file for more info.
Copyright © 2015 IFTTT Inc.