OK, so here's my situation :
- I've got an
NSDictionary, let's call it :myItem. myItem.valueNamescontains the values that I want to show up in the popupmyItem.valuescontains the values the popup must return (e.g. for valueName[0] -> value[0], and so on)myItem.valuecontains the current value
How am I suppose to bind that? Even though I've studied the official reference, it still looks a bit obscure...
I'm currently binding :
myItem.valueNamestoContentmyItem.valuestoContent ObjectsmyItem.valuetoSelected Value
and... all I've managed is that it shows the valueNames.
Any ideas?
Your model is a little strange to me. I wouldn't use an NSDictionary, I'd use a custom subclass with KVC/KVO compliant properties for each of these. Also, if the name of each value is a property of the value object itself, there's no need for a separate
valueNamesproperty. So, with that change, I'd do this:ContenttomodelObjectwith a key path ofvaluesContent ValuestomodelObjectwith a key path ofvalues.nameSelected ObjecttomodelObject(oryourControllerObjectif that makes more sense) with a key path ofvalue(I'd name itselectedValue)