Latest 0.1.4
License MIT
Platforms ios 7.0, requires ARC

[![CI Status]( Rios/CRInputHandler.svg?style=flat)]( Rios/CRInputHandler)

CRInputHandler is a UI Helper class that facilitates the re-location (if needed) of inputs texts like
UITextField and UITextView in iOS applications when it is on focus state. If have worked with forms in iOS
aplications before, you could note that sometimes the iOS keyboard overlap the
input text making a little painful the user experience. So this
class helps you to keep always visible the input when it is on focus.
Also this class manages the user tap actions outside input text views to hide
the keyboard.

This class works observing the events of UITextField and UITextView classes,
so it does not override any delegate method of these UIKit Component.

Life WITH CRInputHandler

input handler image yes

Life WITHOUT CRInputHandler

input handler image not


You need to put your inputs texts inside a UIScrollView and use the -(id)initWithContainer:
to init the class. Your view herarchy should looks similar like this:

 * UIView
 * |-UIScrollView
 * |--UIView
 * |  | |-UITextField
 * |  | |-UITextView
 * |--

The main goals is set the inputs views inside UIScrollView container.

Code Example:

@interface CRViewController ()
__weak IBOutlet UITextField * firstNameTF;
__weak IBOutlet UITextField * lastNameTF;
__weak IBOutlet UITextView * bioTV;
__weak IBOutlet UITextField * emailTF;
__weak IBOutlet UITextField * birthdayTF;

__weak IBOutlet UIScrollView * container;


@property (nonatomic, strong) CRInputHandler * inputHandler;
@property (nonatomic, strong) NSArray * allInputs;

@implementation CRViewController

- (void)viewDidLoad {
[super viewDidLoad];

_allInputs      = @[firstNameTF, lastNameTF, bioTV, emailTF, birthdayTF];
_inputHandler   = [[CRInputHandler alloc] initWithContainer:container];
[_inputHandler setFields:_allInputs];


If you want take a look to Example project. To run the example project,
clone the repo, and run pod update or pod install from the Example directory first.


iOS 6 or higher


CRInputHandler is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "CRInputHandler"

and import it in your class:

#import <CRInputHandler/CRInputHandler.h>


Carlos Rios, [email protected]


CRInputHandler is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "CRInputHandler",
    "version": "0.1.4",
    "summary": "Inputhandler is a helper library that facilitates set on focus an input like UITextField or UITextView in your iOS application.",
    "description": "                       InputHandler lets manage correctly the keyboard when user taps over an input. Also this class manages the keyboard hiding when user tap outside of input.n                       * Markdown format.n                       * Don't worry about the indent, we strip it!n",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Carlos Rios": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.4"
    "platforms": {
        "ios": "7.0"
    "requires_arc": true,
    "source_files": "Pod/Classes",
    "resource_bundles": {
        "InputHandler": [

Pin It on Pinterest

Share This