Open Source: Drop In Solution To Move UITextField Or UITextView When Using Keyboard

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.

Learn how to quickly build apps using Phonegap and Dreamweaver from the start through a series of videos and example projects.  Over 7 hours of video so far explaining what you need to know including maps, the camera api, and more.
Read more...
DeliciousTwitterFacebookLinkedInEmail

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can send a Tweet to @maniacdev on Twitter or submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>