鉴于这本词典:
"vals":[
{
"ID":"1",
"NAME":"Jack"
},
{
"ID":"2",
"NAME":"Jason"
},
{
"ID":"3",
"NAME":"Sheryl"
},
{
"ID":"4",
"NAME":"Clark"
},
{
"ID":"5",
"NAME":"Markus"
}]
我正在使用pickerView的方法:
NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
那么,给定 NSInteger row
,我如何获得该 ID 的名称?