Skip to content

Commit b7730b1

Browse files
committed
fixed form input delegation issue when inputs are not childs of form in storyboard
1 parent dc9bc80 commit b7730b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

iOSFormUtils/Form.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ open class Form: UIScrollView {
116116
fileprivate func handleInputsReturnKeys() {
117117
let inputs = getOrderedInputs()
118118
for input in inputs {
119+
if let input: FormInput = input as? FormInput, nil == input.formInputDelegate {
120+
input.formInputDelegate = self
121+
}
122+
119123
if let textField: UITextField = input as? UITextField {
120124
if textField == inputs.last as? UITextField {
121125
textField.returnKeyType = .go

0 commit comments

Comments
 (0)