Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making the launch image display longer xcode

I need help with launch images on iphone. In the project settings on xcode theres an option to add launch images. I added it and it displays for 2 seconds... I want it to be more... How can i change it? Thanks :)

like image 738
Matan Avatar asked Feb 26 '12 08:02

Matan


People also ask

What is difference between splash screen and launch screen?

Splash Screen is the very first screen the user sees when they open up an app on a mobile device. It's the very first chance of creating a positive impact on the users. It appears while the app is loading when the user has just opened up the app. Many times the Splash screen is called a launch screen.


2 Answers

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

  /*this will pause main thread for x interval seconds. 
  put on the top of application:didFinishLaunchingWithOptions, so it will not 
  proceed to show window until sleep interval is finished.*/

    [NSThread sleepForTimeInterval:2]; //add 2 seconds longer.
   //other code....
}
like image 89
HelmiB Avatar answered Sep 30 '22 18:09

HelmiB


You can also do it by appliying following code in

 -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:  (NSDictionary *)launchOptions
 {
       [NSThread sleepForTimeInterval:2.0]; // Used For Showing Splash Screen for More Time
 }

First create the viewcontroller set the image what you want to show as splash screen/Launc image..

Present that view in method applicationDidFinishLaunching: with Animated:No

and write following code in your another view that your presenting

-(void) viewWillAppear:(BOOL)animated
{

        [self performSelector:@selector(dismiss1) withObject:nil afterDelay:5.0f];
        [super viewWillAppear:animated];

}



-(void) dismiss1
{

         [self dismissModalViewControllerAnimated:NO];

}

If you want to show the splash screen every time app opens, then present the splashscreen viewcontroller in applicationDidBecomeActive method

like image 36
Rupesh Avatar answered Sep 30 '22 18:09

Rupesh