UIPickerView default row
<p>If I want to have the default row when the view controller starts as [2] or any other row number, how do I carry that out?</p>
<pre><code>var pickerData = [&quot;2x2&quot;,&quot;4x4&quot;,&quot;6x6&quot;,&quot;8x8&quot;,&quot;12x12&quot;]    


override func viewDidLoad() {
    super.viewDidLoad()

    totalTilesLabel.text = pickerData[8]

    
    display.text = sentData
    self.picker.delegate = self
    self.picker.dataSource = self

}
</code></pre>
<p>This is the UIPicker datasource and delegate.</p>
<pre><code>func numberOfComponentsInPickerView(pickerView: UIPickerView) -&gt; Int {
    return 1
}

func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -&gt; Int {
    return pickerData.count
}

func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -&gt; String? {
    return pickerData[row]
}

func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {

}
</code></pre>