- Home /
iOS keyboard - limit number of keyboard characters
Im wanting to limit the number of characters the user can put in the keyboard input box. I know how to delete the extra letters once the user has typed them, however i do not want them to be able to type them in the first place as then they just disappear. here is the relevant code i have used:
var text : String;
private var keyboard : iPhoneKeyboard;
function Update(){
if (keyboard.text.length > 9){
keyboard.text = keyboard.text.Substring(0, 9);
}
}
any help would be greatly appreciated, thanks
Comment