In my application i am using picker control,
I want to get the data from array to my picker view,
Array comes like this,
PickerArray:(
{
CustEmail = test@test.com;
CustFirstName = ABC;
CustID = 1;
CustLastName = Test;
CustPhoneNo = 12345;
}
My picker has one component,
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
NSString *title;
title = [[PickerArray objectAtIndex:row]valueForKey:@"CustFirstName"];
NSLog(@"title:%@",title);
return title;
}
with this I am getting just one value If i want to get CustFirstName and Email in one row of picker component.
Like ABC test@test.com;
Please any one suggest how can i do that?
You can use
stringWithFormat:to construct composite strings, like this: