gonecoding / GCOLaunchImageTransition

Animates the transition from the launch image to the app's initial view controller on iOS.

Home Page:gonecoding.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image rotation while loading.

opened this issue · comments

I was curious as to see about implementing rotation while the launch image is loading.

So far I've put the following below, but nothing happens when i rotate.

'''

UIImage* launchImage = nil;

if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone) {

   if (isPortrait) {

       if ([UIScreen mainScreen].bounds.size.height == 480){
           // iPhone 4/4s, 3.5 inch screen
           launchImage  = [UIImage imageNamed:@"Default@2x.png"];
       }
       if ([UIScreen mainScreen].bounds.size.height == 568){
           // iPhone 5/5s, 4.0 inch screen
           launchImage = [UIImage imageNamed:@"Default-568h@2x.png"];
       }
       if ([UIScreen mainScreen].bounds.size.height == 667){
           // iPhone 6, 4.7 inch screen
           launchImage = [UIImage imageNamed:@"Default-667h@2x.png"];
       }
       if ([UIScreen mainScreen].bounds.size.height == 736){
           // iPhone 6+, 5.5 inch screen
           launchImage = [UIImage imageNamed:@"Default-Portrait-736h@3x.png"];
       }

   }else {
       if ([UIScreen mainScreen].bounds.size.width == 480){
           // iPhone 4/4s, 3.5 inch screen
           launchImage  = [UIImage imageNamed:@"Default-Landscape@2x.png"];
       }
       if ([UIScreen mainScreen].bounds.size.width == 568){
           // iPhone 5/5s, 4.0 inch screen
           launchImage = [UIImage imageNamed:@"Default-Landscape-568h@2x.png"];
       }
       if ([UIScreen mainScreen].bounds.size.width == 667){
           // iPhone 6, 4.7 inch screen
           launchImage = [UIImage imageNamed:@"Default-Landscape-667h@2x.png"];
       }
       if ([UIScreen mainScreen].bounds.size.width == 736){
           // iPhone 6+, 5.5 inch screen
           launchImage = [UIImage imageNamed:@"Default-Landscape-736h@3x.png"];
       }
   }

}

'''

Any help would be appreciated.