Call generateDummyTransactions()
from sendButton's
IBAction
method and then fetch the textField's
text
there, i.e.
class VC: UIViewController {
@IBOutlet weak var providerForm: UITextField!
@IBAction func onTapSendButton(_ sender: UIButton) {
self.generateDummyTransactions()
}
func generateDummyTransactions() {
if let text = self.providerForm.text {
//use text here...
}
}
}
solved Calling viewDidLoad in UITextField [closed]