A Helper for all your keyboard needs. Written in Swift.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Example
NYSKeyboardHelper.xcodeproj
NYSKeyboardHelper
.gitignore
.swift-version
.travis.yml
LICENSE
NYSKeyboardHelper.podspec
README.md

README.md

NYSKeyboardHelper

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, matthias@b-nys.com

License

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