Lock your own NSPreferencePane?

Is it possible to implement the blocking effect in the NSPreferencePane we create? Similar to a lock detected in other system settings modes (e.g. power saving, etc.)

I know that I could create a keychain element and then just have the activated boolean value of the controls bound to something that depends on successful user authentication, but is there a better way? Something that represents the same key authentication dialog, with the same message, etc.?

+3
source share
1 answer

You must first read the Authorization Services Programming Guide . Once you understand the concepts, look at the SFAuthorizationView class for the lock icon. Note that although they are similar, the keychain dialog is not associated with the authentication dialog.

+4
source

Source: https://habr.com/ru/post/1725553/


All Articles