[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:)
name:UIApplicationWillTerminateNotification object:nil]; //监听是否触发home键挂起程序.
实现方法
- (void)applicationWillTerminate:(NSNotification *)notification
{
NSLog(@"按理说是触发home按下\n");
}