I found several similar questions, but none of the solutions corresponded to my situation, and most of them were in objective-c, which I do not know.
I am trying to create a timer from minutes and seconds, but I cannot figure out how to connect the second component.
How to configure the second component using UIPickerView?
This is what I have so far:

TimeViewController.swift
class TimeViewController: UIViewController, UIPickerViewDelegate { @IBOutlet weak var timeSegueLabel: UILabel! let minutes = Array(0...9) let seconds = Array(0...59) func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int { return 2 } func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { return minutes.count } func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String! { return String(minutes[row]) } override func viewDidLoad() { super.viewDidLoad() } }
source share