美文网首页
ios监听是否出发home键挂起程序

ios监听是否出发home键挂起程序

作者: 并不值得一提 | 来源:发表于2016-11-21 10:16 被阅读0次

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:)name:UIApplicationWillResignActiveNotification object:nil]; //监听是否触发home键挂起程序.

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:)name:UIApplicationDidBecomeActiveNotification object:nil]; //监听是否重新进入程序程序

相关文章

网友评论

      本文标题:ios监听是否出发home键挂起程序

      本文链接:https://www.haomeiwen.com/subject/nyqupttx.html