Advertisement
mikelily

NSNotificationChangeToUIApplication

Dec 6th, 2019
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.74 KB | None | 0 0
  1. //old
  2. NotificationCenter.default.addObserver(self, selector: #selector(BlurView.applicationDidEnterBackground(_:)), name: NSNotification.Name.UIApplication.didEnterBackgroundNotification, object: nil)
  3. NotificationCenter.default.addObserver(self, selector: #selector(BlurView.applicationWillEnterForeground(_:)), name: NSNotification.Name.UIApplication.willEnterForegroundNotification, object: nil)
  4. //new
  5. NotificationCenter.default.addObserver(self, selector: #selector(BlurView.applicationDidEnterBackground(_:)), name: UIApplication.didEnterBackgroundNotification, object: nil)
  6. NotificationCenter.default.addObserver(self, selector: #selector(BlurView.applicationWillEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement