tags:

views:

37

answers:

1

Hi , every one i create persian custom keyboard.

I am using this code :

NSString *text = textPad.text;
NSRange selectedRange = textPad.selectedRange;
text =  [text stringByReplacingCharactersInRange:selectedRange withString:@"A"];
textPad.text = text;
textPad.selectedRange = selectedRange;

but the problem is when user type a word for example HELLO ... writes : OLLEH !!!!!!! the character writes behind last character instead of after that ! my keyboard is persian custom keyboard !

A: 

i should change your slectedRange location , add this code before the last code :

 selectedRange.location++;
Mc.Lover