I have a UIPickerView and a UILabel, separate from each other.
When the user selects a row in the UIPickerView, I change the UILabel text using the delegate function:
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
{
label.text = String(row);
}
Yet for some reason changing the label's text causes the UIPickerView to jump back to the top (first row).
When I remove the line "label.text = String(row);" the UIPickerView does not jump at all.
This is very strange and I can't find any correlation between the two elements.
Thank you in advance for any replies :)