3

My requirement was to make a application specific keyboard i.e with a different theme and different key contents as compared to the default keyboard. But the way Apple states to implement keyboard requires user effort to add it through Settings->General->Keyboard which I don't want.

So, for that I tried to implement it using a UIView and making it the inputView for UITextView and it is working perfectly fine except for one issue. I added a functionality to add a linebreak in the textView. For that the code I used is

textView.text = "\(textView.text)\n"

Now, whenever I add a linebreak through keyboard, line is changed, but a new cursor appears to blink above the old cursor. I don't know how to get rid of that.

To explain the problem in a better way, here's a GIF image of the issue.

Custom Keyboard

Please help.

manish_kumar
  • 260
  • 2
  • 12
  • it seems that the cursor on first line appears only after the text in third line reaches max no of letters say 50. can you try hide the cursor for whole thing if that limit is reached – AAA Sep 15 '15 at 16:59
  • "text in third line reaches max no of letters say 50" ... can you please explain a little. I suppose the cursor in first line starts appearing before I reach the maximum capacity of the line. – manish_kumar Sep 16 '15 at 05:33

0 Answers0