I am trying to prevent users from entering the characters '#' and empty spaces (' '). I have got as far as below (see code below) but not sure how to complete the rest ...
class CreateTags: UIViewController, UITextFieldDelegate {
/*** OUTLETS ***/
@IBOutlet weak var inputTxtOutlet: UITextField!
override func viewDidLoad() {
self.inputTxtOutlet.delegate = self
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
return true
}
}