didChangeOcclusionStateNotification
Posted when the app’s occlusion state changes.
Declaration
class let didChangeOcclusionStateNotification: NSNotification.NameDiscussion
The system posts this notification on the main actor. Upon receiving this notification, you can query the app for its occlusion state. Note that this only notifies about changes in the state of the occlusion, not when the occlusion region changes. You can use this notification to increase responsiveness and save power by halting any expensive calculations that the user can’t see.
See Also
Notifications
didBecomeActiveNotificationdidChangeScreenParametersNotificationdidFinishLaunchingNotificationdidHideNotificationdidResignActiveNotificationdidUnhideNotificationdidUpdateNotificationwillBecomeActiveNotificationwillFinishLaunchingNotificationwillHideNotificationwillResignActiveNotificationwillTerminateNotificationwillUnhideNotificationwillUpdateNotificationdidFinishRestoringWindowsNotification