On Mac Catalyst my app feature with textfield becomeFirstResponder() doesn't work. I try to put this code in viewwillappear:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
workoutExerciseNameTextField.becomeFirstResponder()
}
I also tried to use:
DispatchQueue.main.async{
workoutExerciseNameTextField.becomeFirstResponder()
}
But this also doesn't work. Cell is twinkle for some time with selection and then twinkle out.
If I run my app in iOS it works as it should, but on Mac becomeFirstResponder() doesn't work.
How I can make textfields become firstresponder on Mac Catalyst versions of ios apps?