In the Preferences window of a macOS app on which I'm working, I have a number of controls that are directly bound via Interface Builder to the shared user defaults controller.
This works well, however since this is an enterprise app, I'd like to add support for managed settings, or in other words I'd like to have the controls for settings which are managed disable.
In the documentation for UserDefaults, Apple recommends using the function objectIsForced to learn if a setting is managed and to manually disable its controls, but this does not fit the binding model since AFAIK binding a control's enabled state to a selector that takes an argument is not possible.
If I understand correctly, to disable those controls I'd either have to set up outlets for each of them and then manually set their enabled state on awakeFromNib, or, I'd have to create computed properties for each and bind to those.
I did test to see if the UserDefaults object would do the disabling automatically by taking advantage of the Conditionally Sets Enabled binding option but it appears that this is not the case.
Is there a way to achieve this using Cocoa bindings alone? If not, what are the best practices to disable controls bound to user defaults?