How can I display the screen saver for a longer period of time than the default time on the iPad?

I tried to show the splash screen so much for a longer period of time, but I did not get the perfect solution, please help me.

+1
source share
1 answer

in the AppDelegate.m file AppDelegate.m just define splashView as UIImageView , and then in the didFinishLaunchingWithOptions method write this type of code ...

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch. splashView = [[UIImageView alloc] initWithFrame:iphoneFrame]; splashView.image = [UIImage imageNamed:@"yourImageName"]; [self.window addSubview:splashView]; [self performSelector:@selector(loadViewIphone) withObject:nil afterDelay:4.0];// define time which you want.. [self.window makeKeyAndVisible]; return YES; } 

and in loadViewIphone mode just delete this splashView as shown below.

 -(void)loadViewIphone { [splashView removeFromSuperview]; self.window.rootViewController = self.tabBarController;// or any viewontroller instead of tabbarController [self.window makeKeyAndVisible]; // this bellow code is used for transactionaly swap splashscreen to our viewcontroller.. CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setType:kCATransitionFade]; [animation setDuration:0.5]; [animation setTimingFunction:[CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]]; [[self.window layer] addAnimation:animation forKey:@"transitionViewAnimation"]; } 
+1
source

All Articles