Last active
May 23, 2016 12:35
-
-
Save joanmolinas/9619657ce2279b77b69fada4667240d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { | |
if (range.location == textField.text.length && [string isEqualToString:@" "]) { | |
textField.text = [textField.text stringByAppendingString:@"\u00a0"]; | |
return NO; | |
} | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment