Latest 1.1.0
Homepage https://github.com/teffi/SMTKeyboardManager
License MIT
Platforms ios 8.0, requires ARC
Authors

SMTkeyboardManager handles automatic scrolling of textfields that hides beneath the keyboard

Version

1.1.0

Changelog v1.1.0

  • Added UITextView support.
  • Updated scrolling calculations that will work for both UITextField and UITextView

Cocoapods – Podfile

pod 'SMTKeyboardManager'

Integration

Set all texfields to a subclass of

SMTTextFieldHandler

Set all TextView to a subclass of

SMTTextViewHandler
Keyboard Monitoring

Inside AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

SMTKeyboardManager * keyboardManager = [SMTKeyboardManager sharedManager];
[keyboardManager startKeyboardMonitoring];
return YES;
}
Delegate Methods
#pragma mark - SMTKeyboardManagerDelegate
#pragma mark -
-(void)SMTKeyboardManagerKeyboardWillShow{
NSLog(@"Hi I was called in delegate controller. Keyboard will show");
}
-(void)SMTKeyboardManagerKeyboardWillHide{
NSLog(@"Hi I was called in delegate controller. Keyboard will hide");
}
Properties
//Set YES to allow tap outside to dismiss keyboard
BOOL supportDismissTap

IMPORTANT

Pre-requisite:

  • Textfields/TextView must be inside a scrollview.
  • View hierarchy should be Controller View -> ScrollView -> TextField

Lets build together!

Fork, implement, pull request.

Copyright

Copyright (c) 2015 Steffi Tan
See MIT-LICENSE for further details.

Latest podspec

{
    "name": "SMTKeyboardManager",
    "version": "1.1.0",
    "summary": "SMTkeyboardManager handles automatic scrolling of textfields that hides beneath the keyboard.",
    "homepage": "https://github.com/teffi/SMTKeyboardManager",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Steffi": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/teffi/SMTKeyboardManager.git",
        "tag": "1.1.0"
    },
    "source_files": "SMTKeyboardManager/SMTKeyboardManager/Classes/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This