NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("closeAlert"), name: UIApplicationDidBecomeActiveNotification, object: nil)//应用后台进入前台通知 NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("closeAlert"), name: UIApplicationWillResignActiveNotification, object: nil)//点击home键应用进入后台通知
时间: 2024-07-31 23:05:01