AutomaticKeyboard
AutomaticKeyboard is an helper to manage views when the keyboard is visible
Installation
CocoaPods
To install AutomaticKeyboard with CocoaPods, add the following lines to your Podfile
.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
pod 'AutomaticKeyboard'
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate AutomaticKeyboard into your Xcode project using Carthage, specify it in your Cartfile
:
github 'Digipolitan/automatic-keyboard' ~> 1.0
Run carthage update
to build the framework and drag the built AutomaticKeyboard.framework
into your Xcode project.
The Basics
In your viewWillAppear set your keyboard property
override open func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if let kv = self.keyboardView {
self.keyboard = Keyboard(view: kv, options: self.keyboardOptions)
}
}
and in your viewDidDisappear
override open func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
self.keyboard = nil
}
After all this steps you need to setup your .xib file to accept AutomaticKeyboard
Check AutomaticKeyboardSample-iOS
for a complete example.
Contributing
See CONTRIBUTING.md for more details!
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
License
AutomaticKeyboard is licensed under the BSD 3-Clause license.