iphone - Can I limit the character set for a UITextField? -
I have a bitmap font that does not contain any letters, such as pronunciation characters (é î ü etc) or symbols such as " ¥ "or © which I'm using to display the user name in a game for highscore table.
Is it possible to limit the UI keyboard to certain characters, or only certain characters are allowed in the UTIPField? Or do I have to roll my input mechanism? I'm thinking and old school, arcade style, once a "thing" a letter will be fine.
You can try to use the following UITextFieldDelegate method:
< Code> - (BOOL) textField: (UITextField *) textField shouldChangeCharactersInRange: (NSRange) Category Replacement String: (NSString *) string;
Comments
Post a Comment