I\'m trying to show changes made to a UITextField on a separate UILabel. Is there a way to capture full text of the UITextField after
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if textField == yourTextFieldOutletName
{
if yourTextFieldOutletName.isEmpty == false
{
youtlabelname.text = yourTextFieldOutletName.text!
}
}
return true
}
func textViewDidEndEditing(_ textView: UITextView) {
if textField == yourTextFieldOutletName
{
if yourTextFieldOutletName.isEmpty == false
{
youtlabelname.text = yourTextFieldOutletName.text!
}
}
}