Mac Catalyst textview first responder

340 views Asked by At

I've strange interface behavior when I try to implement my notes app works on Mac with Catalyst. I made textview

textView.becomeFirstResponder()

But after I creating new notes Catalyst in some way moves focus to back button. And after creating another textview focus works as it should.

show image

So it's rotates and I don't understand why textView.becomeFirstResponder() not works everytime.

1

There are 1 answers

0
neskafesha On BEST ANSWER

Try to do this in an asynchronous firebox

DispatchQueue.main.async{
     textView.becomeFirstResponder()
}