Skip to content

Instantly share code, notes, and snippets.

@hechen
Created May 4, 2019 11:07
Show Gist options
  • Save hechen/dadd57e968e1bf56b6adb569d546cc72 to your computer and use it in GitHub Desktop.
Save hechen/dadd57e968e1bf56b6adb569d546cc72 to your computer and use it in GitHub Desktop.
setActivationPolicy
/* Attempts to modify the application's activation policy. In OS X 10.9, any policy may be set; prior to 10.9, the activation policy may be changed to NSApplicationActivationPolicyProhibited or NSApplicationActivationPolicyRegular, but may not be changed to NSApplicationActivationPolicyAccessory. This returns YES if setting the activation policy is successful, and NO if not.
 */
 @available(OSX 10.6, *)
 open func setActivationPolicy(_ activationPolicy: NSApplication.ActivationPolicy) -> Bool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment