0

I have to build an app that will use the Japanese handwriting mazec business keyboard. This keyboard has 2 seperate modes:

1/ kanji recognizer mode that will appear mostly as the native Chinese handwriting keyboard and recognize user's handwriting and translate to kanji character

2/ image mode that will provide a drawing pad so what user draw will be capture as an image

However, my client wants to use those 2 modes at once, i.e. user can write on the kanji recognizer, and can choose to export what he wrote as image also.

I have searched through Apple documentation and I think there is no way to access the keyboard input view directly to capture what user write.

So I'm thinking about a possible work-around that will track user gesture on the keyboard and draw it in another view programmatically, and that view can be exported as image later. But I'm not sure is there any way to track the pan gesture on the keyboard view.

  • iOS8 allows you to make custom keyboards, you could make one for the app maybe? (If you're doing that though you may as well just hard code your own keyboard into the app instead of using Apple's standard keyboard) Also I don't know the answer but I have a feeling you will be tracking the gestures on the key window level status bar which is above the keyboard, not on the keyboard itself. – Albert Renshaw Jun 24 '15 at 00:34
  • Thank you. Creating a new keyboard is not an option for me, because the mazec keyboard is a very well built keyboard with good dictionary data and good kanji recognizer. It takes time to build something equal and I only have 3 days for this. – Quang Lam Phan Jun 24 '15 at 00:37
  • I think you will have much more luck capturing the whole screen including the keyboard somehow, then cropping it. I wouldn't try to track gestures on the keyboard and redraw the image and capture it, just an extra step. – Albert Renshaw Jun 24 '15 at 00:47
  • Apparently this http://stackoverflow.com/a/15184171/2057171 can capture the whole device screen INCLUDING the keyboard. Then just crop down the the drawing window of the keyboard and that's your image. – Albert Renshaw Jun 24 '15 at 00:48
  • Well that will be my last resort. Because after user finish writing, some delete buttons will appear on the drawing window and sometimes they overlap the characters, so I don't really want to use the screen capture work-around. – Quang Lam Phan Jun 24 '15 at 01:10
  • Okay! Good luck with gesture recognition :D If you do decide to go with screen capture work around perhaps you could take multiple snapshots and then analyze the pixels of the snapshot for the delete buttons, while{ the options are there than use a snapshot form 0.3 seconds earlier, return; – Albert Renshaw Jun 24 '15 at 04:20

0 Answers0