Instance Method

setActivationPolicy:

Attempts to modify the app’s activation policy.

Declaration

- (BOOL)setActivationPolicy:(NSApplicationActivationPolicy)activationPolicy;

Parameters

activationPolicy

The desired activation policy.

Return Value

YES if the policy switch was successful, otherwise NO.

Discussion

Currently, NSApplicationActivationPolicyNone and NSApplicationActivationPolicyAccessory may be changed to NSApplicationActivationPolicyRegular, but other modifications aren’t supported.

See Also

Configuring the Activation Policy

- activationPolicy

Returns the app’s activation policy.

NSApplicationActivationPolicy

Activation policies (used by activationPolicy) that control whether and how an app may be activated.