Blog

Headnix — Clip It!

Monday, May 23, 2011 Tips to those using text view and keyboard in iOS

When you have a long input form in your iOS app, you probably should pay attention to position of the text input fields when user taps of them. The software keyboard may cover those elements.

If you are housing the text input fields in UITableView, good news for you. iOS UITableView will make sure text input field in focus is not hidden by the software keyboard. However, if you implement your own scrollview, you have to handle that yourself.

Apple offers a great document on this matter – Moving Content That Is Located Under the Keyboard. I have a few things to add to complement the documentation…

  • If you listen to keyboard notification and implement text view delegate methods as well, the keyboard notification is actually called after the those text view “should” and “did” begin edit. And, in another runloop cycle.
  • You will receive keyboard notification more than once (within the same text view being and did end edit session)! When user switches input method of the keyboard, the keyboard notifications are fired.

Some asian language keyboards for reference:

Chinese pinyi iPad Chinese Pinyi Keyboard

Japanese fifty key iPad Japanese Keyboard

You can download my test code to understand the behavior better – TextViewEditUX.zip 656kB.

If you are looking for Finger iPhone app, please go to Finger's site.

Copyright © 2007 Headnix. All rights reserved. Design by BeansBox.