Separate names with a comma.
Discussion in 'Mac Programming' started by i.yalovecky, Apr 29, 2010.
I wanna bind dictionary elem to textfield, how i can do this?
UITextField *textField; // assumed its already instantiated.
NSDictionary *dict; // assume you have a dict already with key @"key"
textField.text = [dict objectForKey: @"key"];
You bind to a dictionary just like you'd bind to anything else.
For example, if you have a Controller object that holds your dictionary "dict" containing a key "Name", then you'd bind to the Controller and set the Model Key Path to "dict.Name".