Wednesday 18 December 2013

Switching one view to another view using Timer in iPhone(IOs)

- (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    self.window.rootViewController = self.viewController;   
    [self.window makeKeyAndVisible];
    [viewController showSplash];
}

 > IBOutlet UIView *modelView;
- (void)showSplash;
- (void)hideSplash;
-(void)showSplash {
    UIViewController *modalViewController = [[UIViewController alloc] init];
    modalViewController.view = modelView;
    [self presentModalViewController:modalViewController animated:NO];
    [self performSelector:@selector(hideSplash) withObject:nil afterDelay:2.0];
}
//hide splash screen
- (void)hideSplash {
    [[self modalViewController] dismissModalViewControllerAnimated:YES];
}

No comments:

Post a Comment

Comment