Latest 0.2.1
Homepage https://github.com/matthiasnys/NYSKeyboardHelper
License MIT
Platforms ios 9.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

Cocoapods

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

pod 'NYSKeyboardHelper'

Carthage

NYSKeyboardHelper is available through Carthage. To install it, simply add the following line to your Cartfile:

github "matthiasnys/NYSKeyboardHelper"

Use

Storyboards

Simply pin a constraint to the bottom of your view and the scrollview that wraps your textinput. Override the NSLayoutconstraint as ‘NYSKeyboardHelper’. And that’s it. It should automatically shrink your scrollview to not go under your keyboard.

Add some ‘extra indent’ in the properties of the constraint to have a bit of margin between your containerview and the view.

Code

let keyboardConstraint = NYSKeyboardHelper(item: self.view, attribute: .bottom, relatedBy: .equal, toItem: scrollView, attribute: .bottom, multiplier: 1.0, constant: 0.0)
keyboardConstraint.extraIndent = 10.0
self.view.addConstraint(keyboardConstraint)

set the ‘extraIndent’ property to have more margin between your containerview and the view.

Author

matthiasnys, [email protected]

License

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

Latest podspec

{
    "name": "NYSKeyboardHelper",
    "version": "0.2.1",
    "summary": "A constraint that fixes your keyboard needs",
    "swift_version": "4.2",
    "description": "A keyboard constraint class that can manage your keyboard needs in different situations. It automagically makes your bottom constraint interactive so you don't have to worry about it. Just pin it between your containerview and the input view.",
    "homepage": "https://github.com/matthiasnys/NYSKeyboardHelper",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "matthiasnys": "[email protected]"
    },
    "source": {
        "git": "https://github.com/matthiasnys/NYSKeyboardHelper.git",
        "tag": "0.2.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "NYSKeyboardHelper/Classes/**/*"
}

Pin It on Pinterest

Share This