William Boles

  • Limit number of characters entered into texfield

    April 25th, 2011

    A common scenario in iOS development is to create a textfield that will only allow a certain number of characters to be entered. This often crops up in the form of PIN codes or password entry fields. - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { BOOL validCharactersInRange …


Home / About / Favourites / Twitter / RSS