I'm trying to figure out how to format a phone number being entered while typing live.
I saw this post on the function to do that, but I can't figure out what UITextFieldDelegate
to call.
Formattting Phone number in Swift
Should I be using this?:
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool
The function just returns a bool, so I'm unsure how to implement it with the format function from the linked post.