0

I have 10 TextFields, each TextField is a character (it can be numbers or letters). Each TextField will have difference appearance, 10 fields will build to a 10 characters code.

Every time the user input a character into the field, I will switch focus to the next field to ensure smooth input. But each time I switch to the next view, the keyboard will return to its original state (ex: in the previous field I toggle to the numeric keypad to enter (numbers), the next field will reset to normal (letters)) . Is there a way to detect the state of the keyboard before changing the field and manually set it?

Thanks in advance

enter image description here

Truong Vu
  • 204
  • 4
  • 14

1 Answers1

0

I think you should use one UITextField or create custom InputView. For example, you can look at SGDigitTextField or SGCodeTextField.
Main idea is using a hidden UITextView to get input and draw a inputted text with labels.

Andrew Romanov
  • 4,774
  • 3
  • 25
  • 40