title: UIPickerView select first row programmatically
body: <p>There are a lot of questions like this, but I believe my case is unique.</p>
  
  <p>I have a pickerview that pops up when a textbox is clicked inside.  The user selects their location in the pickerview, and it's put into the textbox.  </p>
  
  <p>When opening the pickerview, the slider is on the first element, but if i click the done button to minimize the pickerview, that no element is selected (i.e. you must scroll down and back up to select the first element)</p>
  
  <p>I've tried </p>
  
  <pre><code>    [pickerView selectRow:0 inComponent:0 animated:YES];
  </code></pre>
  
  <p>and various combinations of it, but it only puts the slider on that element, again not actually selecting it.</p>
  
  <p>Some answers said to apply the above code in the viewDidLoad() method, but unfortunately I'm pulling the location array in from a web service and cannot do that.</p>
  
  <p>Ideally, I'd like to work as - the user clicks in the textbox, the pickerview pops up as normal, if at that point the done button is clicked, the first item is selected.</p>
  
  <p>Thankyou in advance</p>