2

After making usernameTextfield firstresponder, I see below screen for entering username.

As of now Next button can be focused and after press takes me to next passwordfield screen I want to disble (or not focused) Next button until textfield has 0 characters. How can I do it? Also, how can I capture tv remotes Back and Press event on keyboard?

I read other post How to disable/enable the return key in a UITextField? but It didn't helped me.

In apple docs, it's mentioned that

optional public var enablesReturnKeyAutomatically: Bool { get set } // default is NO (when YES, will automatically disable return key when text widget has zero-length contents, and will automatically enable when text widget has non-zero-length contents)

If this is not possible, then is it possible to add tapgesturerecognizer on this screen so that I can know when user click or pressed Menu button on Remote?

Naren
  • 1,504
  • 16
  • 19

1 Answers1

1

As of now my research says its not possible to disable return key ( Next / Done ) in tvOS but its possible to know when user clicked Next or Done button on keyboard by using .primaryActionTriggered event.

Naren
  • 1,504
  • 16
  • 19