How can I listen for an event when a user opens the app switcher (the UI that comes up when a user double taps on the home button) on iOS.
I though UIApplicationDidEnterBackgroundNotification would fire, but it doesn't fire when I open the app switcher. It only fires when I minimize the app by tapping the home button once.
NSNotificationCenter.defaultCenter().addObserver(
self,
selector: "onPause",
name: UIApplicationDidEnterBackgroundNotification,
object:nil)
func onPause() {
//Not invoked when app switcher is opened
}