if the character reaches particular limit text will be truncated in UITextField, if we move the cursor to truncated(LineBreakMode) character it's not displaying full text, it's displaying like “…”, is any other option to display those truncated character in UITextfield
Move the cursor to truncated character it's not displaying full text in UITextField
What you want to achieve exactly ? Do you face a specific problem ?
To limit text at certain length, you need to implement in shouldChangeCharactersIn, something like this:
To limit text at certain length, you need to implement in shouldChangeCharactersIn, something like this:
Code Block func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { if textField.text!.count 3 1 { return false } return true }
I don't want to limit the text at certain length, i need to enter n number of character in textfield the problem i am facing is
If we are entering about 25 digits, the beginning of the line will be "......"(i.e truncated), but if I tap on it to enter into edit mode by putting cursor to "...." even if I enter digit or delete digit , I cannot see the digit being added or deleted.
If we are entering about 25 digits, the beginning of the line will be "......"(i.e truncated), but if I tap on it to enter into edit mode by putting cursor to "...." even if I enter digit or delete digit , I cannot see the digit being added or deleted.