Possible Duplicate:
How do I kill a back ground running app in iphone?
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.
-(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;
}