Quantcast
Channel: Active questions tagged uipickerview - Stack Overflow
Viewing all articles
Browse latest Browse all 592

How to use data for more than one UIPickerView using didSelectRow

$
0
0

Got a problem, cannot figure out how to use data from more than UIPickerView using didSelectRow method.

Problem is that components and rows are not separate, is there any chance to use separate rows and components?

Im trying to change label.text to some data from arrays, but it changes in other arrays even when im changing one pickerview.

func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { 
        resultLabel1.text = "\(pickerData![component][row]) \(timeNumber[row - 1]) \(timePickerData[row - 1])"

      //    print(component)
      //  print(unitsPickerView.selectedRow(inComponent: component))
      //  print(pickerData![component][row])

    }

Viewing all articles
Browse latest Browse all 592

Trending Articles