Yes, this is part of what the options dictionary is for. Key-value binding allows the bound value to be transformed before it is set, via an NSValueTransformer
, and you can specify the transformer in the options for the binding.
The NSValueTransformer
class provides some default, named transformers. In this case, you'll be interested in NSNegateBooleanTransformerName
.
Thus the binding you want will look like:
[self.detailInputArea bind:@"hidden"
toObject:self
withKeyPath:@"enabledCheckbox"
options:@{NSValueTransformerNameBindingOption : NSNegateBooleanTransformerName}];