Getting selected value of a UIPickerViewControl in Swift

you will have to set the picker view delegate to self and override this function

func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
   {
        // use the row to get the selected row from the picker view
        // using the row extract the value from your datasource (array[row])
    }

or

you can use this to extract as per your usage

var selectedValue = pickerViewContent[pickerView.selectedRowInComponent(0)]

where pickerViewContent is your array of dataSource

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)