Listen to the event when the user opens the application switch on iOS

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
}
+4
source share
1 answer

UIApplicationWillResignActiveNotification. , .

, UIApplicationDidBecomeActiveNotification, . , UIApplicationDidEnterBackgroundNotification.

+3

All Articles