I have 2 places where I require a UIPickerView in my app and the values that the second represents is dependent on the result of the first one.
However the values of the first one can be changed at run time and so I do not know what they are going to be. This leaves me out the hardcoding option of doing it this way:
if([_menuCategoryPickerFld.text isEqualToString:@"food_breakfast"])
{
}
This would require hardcoding values into my app.
Now the source of my data is MySQL imported via JSON, so when I select an option in the first UIPickerView, it will query and return the correct JSON file.
I need to know if I can compare a value of an array that I will only receive once the app is running??
Thanks in advance.
Not sure I understand, but why not just:
You don’t need to the the contents of a string to use it in a compare this way.