title: Getting titleForRow Using UIPicker from NSArray - Swift
body: <p>I'm trying to return the object from my array using a UIPickerViewDelegate below:</p>
  
  <pre><code>var myArr = NSArray()
  </code></pre>
  
  <p>Adding objects to my array</p>
  
  <pre><code>self.myArray = NSArray(objects: "Mr", "Mrs", "Miss", "Ms", "Dr", "Master", "Rev",
              "Fr", "Atty", "Prof", "Hon")
  </code></pre>
  
  <p>Here is my delegate</p>
  
  <pre><code>func pickerView(pickerView: UIPickerView!, titleForRow row: Int, forComponent component: Int) -&gt; String! {
      var string = NSString(coder: self.myArray.objectAtIndex(row) as NSCoder)
      return string
  }
  </code></pre>
  
  <p>However this throws an exception. How do i do this simple task?</p>