I have a dependent UIPicker
that loads the values into its two components from a plist. It's an NSDictionary
with NSArrays
of strings. The user selects a pair of components and the picker sends those two strings back to the delegate. What I really need is a constant that goes along with each individual choice. For example, first component is A, B, C and each choice has three subchoices A1, A2, A3, etc... User selects ChoiceA with ChoiceA3 and the picker returns the two strings fine, but I have a numeric constant that is associate with A-A3 and that is what I actually need for the math in my program.
Can I have two things associated with a particular key - a string AND a number? I guess what I want is a key-value-value pair (triplet)? It seems like using logic in my program to assign a value based on the key-value pair returned defeats the purpose of using a plist in the first place.