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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With