Hello, it’s me again.
I’m just beginning to discover how much IB can lighten my coding, and I want to know how far it goes.
I have a text view in which I want to put alternatively two versions of a text (let’s say “long” and “short” versions).
No problem to put on a text after reading it from file: if I have this NSMutableDictionary named *theDict", with keys “longText” and “shortText”, I bind the “value” of textView to theDict.longText and it works divinely (not forgetting to put MY when something change inside the code part :/)
But I have a switch button to toggle between long and short version. So I want my referenced value to change accordingly to the value of this button (which is a property too).
Is there a way to add, in IB, a modifier to the Model Key Path? What is this Value Transformer? Is it possible to use it to switch between theDict.longText and theDict.shortText, using the value of the button?
Of course it’s easy to do it by code. That’s my present solution, and it works. But… I just wanted to know.
Regards