title: How to terminate my apps or relaunch it in xcode?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1916516/how-do-i-kill-a-back-ground-running-app-in-iphone">How do I kill a back ground running app in iphone?</a>  </p>
  </blockquote>
  
  
  
  <p>When the user click on home button in the user's iphone, how to terminate my apps in xcode. So when the user click on the apps, it should be in the splash screen again.
  Please help.</p>
  
  <pre><code>-(BOOL)application:(UIApplication *)application   didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
  
  sleep(3);
  
  MyViewController *aViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
  
  self.myViewController = aViewController;
  
  [aViewController release];
  
  self.window.rootViewController = self.myViewController;
  
  // Override point for customization after application launch.
  
  
  [self.window makeKeyAndVisible];
  
  return YES;
  
  
  }
  </code></pre>