One of the more tedious problems when programming with Cocoa Touch is that when a user starts editing a UITextField or UITextView the keyboard pops up covering the lower part of the screen often covering the actual text the user is editing.
You can handle this by using the delegate methods associated with the UITextField and UITextView objects, and moving things around yourself adjusting for every text field, but I’ve found a much simpler solution.
The solution is an open source library from Michael Tyson that automatically moves things around so you can actually see what’s being edited.
The solution can be found on Github here:
https://github.com/michaeltyson/TPKeyboardAvoiding
It’s very easy to use, and the instructions are on the Github page. A good solution for a common problem that can handle most situations.
©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.
.





