So I have thisUITableView
cell that has 4 UITextField
, and I want to get their values on button click.
This code does not retrieve any valu
func textField(_ textField: UITextField, shouldChangeCharactersIn range:NSRange, replacementString string: String) -> Bool {
// let kActualText = (textField.text ?? "") + string
var kActualText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
kActualText = kActualText.trimmingCharacters(in: .whitespaces)
if textField.tag == 0
{
email_address = kActualText;
}
else if textField.tag == 3
{
password = kActualText;
}
else
{
print("It is nothing")
}
return true;
}