skip to Main Content

Xcode – how to check textfield is not empty and button enable

I want to check textfield is empty func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { let text = (textField.text! as NSString).replacingCharacters(in: range, with: string) if !text.isEmpty { self.completeRegisterBtn.isEnabled = true } else { self.completeRegisterBtn.isEnabled =…

VIEW QUESTION
Back To Top
Search