Fixed that iOS 14 creates text field often twice, but displays it once -> to focus next text field we have to use nextViewTag + 1
This commit is contained in:
parent
b00a14b3c7
commit
0bfeddeea3
|
@ -210,7 +210,9 @@ struct UIKitTextField: UIViewRepresentable {
|
|||
|
||||
let nextView = textField.superview?.superview?.superview?.viewWithTag(nextViewTag)
|
||||
?? textField.superview?.superview?.superview?.superview?.superview?.viewWithTag(nextViewTag) // for text fields in Lists (tables)
|
||||
|
||||
?? textField.superview?.superview?.superview?.viewWithTag(nextViewTag + 1) // iOS 14 often creates the same TextField twice but displays it once -> to select next view use nextViewTag + 1
|
||||
?? textField.superview?.superview?.superview?.superview?.superview?.viewWithTag(nextViewTag + 1)
|
||||
|
||||
didHandleReturnKey = nextView?.focus() ?? false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue