-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Discovered this while trying to select subsequent text field during textFieldShouldReturn.
I think this is an issue in Bond as well, I saw it there first.
import UIKit
import ReactiveUIKit
class ViewController: UIViewController {
@IBOutlet weak var textField1: UITextField!
@IBOutlet weak var textField2: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
textField1.delegate = self
textField2.delegate = self
// by observing textField2 we can't make it first responder when
// textField1 should return.
textField2.rText.observe { text in
print(text)
}
}
}
extension ViewController: UITextFieldDelegate {
func textFieldShouldReturn(textField: UITextField) -> Bool {
if textField == textField1 {
textField2.becomeFirstResponder()
}
return true
}
}ianterrell
Metadata
Metadata
Assignees
Labels
No labels