I am using the Eureka forms swift library here: Eureka forms
I would like to have my first row of the input form become the first responder every time the view appears. I tried adding a .cellUpdate callback which is fired everytime the view appears, and doing a cell.becomeFirstResponder() but this did not work. Could someone with experience in this library please help? Thanks.
Try this
import UIKit
import Eureka
class ViewController3: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()
form +++ Section("Custom cells")
<<< TextRow("TextRow"){_ in
}
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
let row = self.form.rowByTag("TextRow") as! TextRow
row.cell.textField.becomeFirstResponder()
}
}
I hope this helps you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With