title: Best way to populate an array of Strings in objective C
body: <p>In Objective-C, I am looking for a cleaner way to populate an array of strings.</p>
  
  <p>I want to populate an array and the easiest solution appears to be hardcoding like</p>
  
  <pre><code>NSArray *arr =  [[NSArray alloc] initWithObjects:@"First",@"Second",@"Third",nil];
  </code></pre>
  
  <p>I am using the objects (Strings) from this array for a UIPicker which I am able to do. Now, once the user selects an option (First/Second/Third) from the picker, I need a corresponding value for each of them.</p>
  
  <p>Like in html we have <code>&lt;option value="1"&gt;First&lt;/option&gt;</code> which makes a direct correspondence between name value pair very explicit.</p>
  
  <p>So, one option is to create another array and when the user selects an item in the picker get the value from second array from the corresponding position and use that.</p>
  
  <p>I am wondering is that how we do it or is there a better way. Would it be better to have such static data in an xml (or something) and be able to easily read from there so the code doesn't get messed up?</p>