Интересно, как правильно получить выбранное значение pickerView.
Прямо сейчас мой код выглядит так:
var timeLeft: Int?
func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
if pickerView.tag == 0 {
TimeLeftBtnLabel.text = TimeLeftPickerData[row]
timeLeft = row
}
}
или я должен сделать это так:
var timeLeft: Int?
func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
if pickerView.tag == 0 {
TimeLeftBtnLabel.text = TimeLeftPickerData[row]
timeLeft = TimeLeftPicker.selectedRowInComponent(0)
}
}