Hi dear ,i have problem with the custom backspace and enter buttons on custom iPhone keyboard ,
The Backspace : my codes just remove characters at the end of the line not from the cursor location .
if ([textView.text length]>0) textView.text = [textView.text substringToIndex:([textView.text length]-1)];
and read this question http://stackoverflow.com/questions/2536691/custom-keyboard-iphone-having-problem-with-backspace-button-in-uitextview but didn't solve my problem .
The Enter : i have same problem like backspace the enter button just the inserts new line at the end of sentence not not from the cursor location .
textView.text = [NSString stringWithFormat:@"%@\n", textView.text];
how should i change my codes to work fine ? thank you
EDIT : //BACKSPACE BUTTON CODE :
NSRange deleteRange = textPad.selectedRange;
deleteRange.length -= 1;
if ([textPad.text length]>0) textPad.text = [textPad.text stringByReplacingCharactersInRange:deleteRange withString:@""];