Add automatic keyboard-avoidance to an iOS form screen without writing any custom scroll-management code.
Enable the keyboard Next button to jump between text fields in order automatically throughout an app.
Apply keyboard avoidance to a table view by swapping in one custom class with no other changes.
Prevent text fields from being hidden by the keyboard on a login or sign-up screen without custom UIScrollView logic.
TPKeyboardAvoiding is an iOS library that solves a common problem: when a user taps a text field on screen, the on-screen keyboard pops up and often covers the field they are trying to type into. Rather than leaving developers to write their own workaround for every screen in an app, this library provides a ready-made fix that you drop in once and it works across your whole project. The fix works through two custom view classes: a scrollable view and a table view, both of which are subclasses of standard iOS components. When the keyboard is about to appear, these classes automatically find whichever text field the user is about to edit, scroll to it, and animate it into view so it is not hidden. When the keyboard goes away, the view returns to its original size. The animation is intentionally matched to the keyboard's own pop-up animation so the transition feels natural. Setup is minimal. For screens built around a table view, you swap in the library's table view class in your interface file. For other screens, you place the library's scroll view class as the container and put all your input fields inside it. Both approaches can be done either through an interface builder file or in code directly. One extra convenience: the library also wires up the "Next" button on the keyboard automatically, so tapping it moves focus to the next text field in order. If you do not want that behavior for a particular field, you can turn it off by changing that field's return key type. The library is written in Objective-C and released under the Zlib license, which allows free use in personal and commercial apps with minimal restrictions. It is a mature project, originally authored by Michael Tyson, and its age means it has been tested against a wide range of iOS setups over the years.
← michaeltyson on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.