I tried to scroll this Picker to a default value, and unfortunately, it works only from viewDidAppear.
override func viewDidAppear(_ animated: Bool) {
colorPicker.preselectedIndex = Int(task.colorIndex)
}
If I try to use from viewDidLoad or from viewWillAppear, it doesn't work at all. However viewDidAppear it is not very suitable for it, because it shows colors and scrolls only after. It looks like a bug.