Baby steps in swift 3: Limit text input
Sometimes you don’t want users of your app to be able to write an infinite amount of text. For example, one of the core concepts of twitter is its 140 character limit count, so I tried it out!
Below is the code with comments in it.
This is a good article on how to limit text input:
Try the following implementation of -textField: shouldChangeCharactersInRange: replacementString: that is part of the…stackoverflow.com
Github repo for code: https://github.com/cc-lemon/ios_limit_characters