3

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?

alexsmith
  • 199
  • 2
  • 10

1 Answers1

0

Are there any ListViews? In my app, they seem to become firstREsponder after a selection, and then don't let go. I force it to relinquish control in the didselect: method.

polymerchm
  • 188
  • 1
  • 7