Intercept System Events

suggest change

Using the NotificationCenter of iOS, which can be very powerful, you are able to intercept certain app-wide events:

NotificationCenter.default.addObserver(
        self,
        selector: #selector(ViewController.do(_:)),
        name: NSNotification.Name.UIApplicationDidBecomeActive,
        object: nil)

You can register for a lot of more events, just take a look at https://developer.apple.com/reference/foundation/nsnotification.name.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents