Contents

screensDidSleepNotification

A notification that the workspace posts when the device’s screen goes to sleep.

Declaration

class let screensDidSleepNotification: NSNotification.Name

Discussion

The notification object is the shared NSWorkspace instance. The notification doesn’t contain a userInfo dictionary.

Not many apps use this notification, but it can be useful for certain hardware-based drawing decisions, for example when using OpenGL.

See Also

Responding to Environment Notifications