[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector (onTerminate)
name:UIApplicationWillTerminateNotification
object: nil ]
//进入后台
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector (applicationWillEnterBackground) name:UIApplicationDidEnterBackgroundNotification object: nil ]
-( void )onTerminate {
NSLog(@"杀掉进程")
}
/// 进入后台
- ( void )applicationWillEnterBackground {
NSLog(@"1进入后台")
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)