From 35eba0126efd0154f2c959a55adbb334f583609f Mon Sep 17 00:00:00 2001 From: Jason Filipe Date: Tue, 3 Jun 2014 13:58:05 -0400 Subject: [PATCH] Updated launch image handler to work with iOS7+ default. --- GCOLaunchImageTransition/GCOLaunchImageTransition.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GCOLaunchImageTransition/GCOLaunchImageTransition.m b/GCOLaunchImageTransition/GCOLaunchImageTransition.m index c526271..1dd4296 100644 --- a/GCOLaunchImageTransition/GCOLaunchImageTransition.m +++ b/GCOLaunchImageTransition/GCOLaunchImageTransition.m @@ -214,6 +214,14 @@ - (UIImage*)launchImageForOrientation:(UIInterfaceOrientation)orientation { NSDictionary* infoDict = [[NSBundle mainBundle] infoDictionary]; NSString* launchImageName = [infoDict valueForKey:@"UILaunchImageFile"]; + + if (launchImageName == nil) { + // iOS 7+ default handling of Launch Images + NSArray* launchImagesArray = [infoDict objectForKey:@"UILaunchImages"]; + if (launchImagesArray && [launchImagesArray count] > 0) { + launchImageName = [[launchImagesArray objectAtIndex:0] valueForKey:@"UILaunchImageName"]; + } + } launchImage = [UIImage imageNamed:launchImageName]; }