Reputation: 2460
Is it possible to implement a locking effect in a NSPreferencePane that we create? Similar to the lock found in other system preferences panes (such as Energy Saver, etc)
I know that I could create a keychain item and then just have the enabled boolean of the controls bound to something that depends on the user authenticating successfully, but is there a better way? Something that presents the same keychain authentication dialog, with the same message, etc?
Upvotes: 3
Views: 257
Reputation: 26558
You should first read the Authorization Services Programming Guide. Once you have understood the concepts, have a look at the SFAuthorizationView class for the lock icon. Note that although they are similar, a keychain dialog is not related to an authentication dialog.
Upvotes: 4