How can I listen to the event when the user opens the switch (the user interface that appears when the user double-clicks on the house) on iOS.
Although the UIApplicationDidEnterBackgroundNotification fires, it does not fire when the application switcher is opened. It fires when I minimize the application by pressing the "Home" button once.
NSNotificationCenter.defaultCenter().addObserver( self, selector: "onPause", name: UIApplicationDidEnterBackgroundNotification, object:nil) func onPause() { //Not invoked when app switcher is opened }
UIApplicationWillResignActiveNotification. , .
UIApplicationWillResignActiveNotification
, UIApplicationDidBecomeActiveNotification, . , UIApplicationDidEnterBackgroundNotification.
UIApplicationDidBecomeActiveNotification
UIApplicationDidEnterBackgroundNotification