Работает, когда я заменяю:
func getString(from pickerView: UIPickerView, inComponent component: Int) -> String {
return pickerView(pickerView, titleForRow: pickerView.selectedRow(inComponent: component), forComponent: component)
}
по:
func getString(from picker: UIPickerView, inComponent selectedComponent: Int) -> String? {
return pickerView!(picker, titleForRow: picker.selectedRow(inComponent: selectedComponent), forComponent: selectedComponent)
}