title: Selecting a row in a UIPickerView - swift
body: <p>I'm trying to select a row of a picker view in Swift.I know there are other questions like this but they all have the same answers which doesn't work for me. Such questions can be located at : <a href="https://stackoverflow.com/questions/27180995/uipickerview-selectrow-doesnt-works">UIPickerView selectRow doesn&#39;t works</a> .</p>
  
  <p>They all point to use this code in the <code>viewDidAppear</code> :</p>
  
  <pre><code> pickerview.selectRow(3, inComponent: 0, animated: true)
  </code></pre>
  
  <p>But the View Controller still looks like this: <a href="https://i.stack.imgur.com/zMLFJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zMLFJ.png" alt="simulator"></a></p>
  
  <p>Any ideas on how to select a row?</p>