x


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

more ▼

asked Jan 27 '12 at 02:35 PM

mehowe7 gravatar image

mehowe7
31 15 15 17

could somebody help please :)

Jan 30 '12 at 11:30 AM mehowe7
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1966
x955
x420
x195
x55

asked: Jan 27 '12 at 02:35 PM

Seen: 808 times

Last Updated: Jan 30 '12 at 11:30 AM