How can I set the maximum amount of characters in a UITextField on the iPhone SDK when I load up a UIView?
UITextField
UIView
What about this simple approach. Its working fine for me.
extension UITextField { func charactersLimit(to:Int) { if (self.text!.count > to) { self.deleteBackward() } } }
Then:
someTextField.charactersLimit(to:16)