1.按住home键怎么保存程序的运行状态:
监听按home键的时候程序挂起的状态(通知),然后让其重新进入程序[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:)
name:UIApplicationWillResignActiveNotification object:nil];
2.当程序运行时 按下home键 iOS会调用哪个代理:
.- (void)applicationWillResignActive:(UIApplication *)application {}
时间: 2024-10-11 21:06:31