项目作者: Digipolitan

项目描述 :
iOS keyboard automatic handler
高级语言: Swift
项目地址: git://github.com/Digipolitan/automatic-keyboard.git
创建时间: 2017-10-24T08:43:27Z
项目社区:https://github.com/Digipolitan/automatic-keyboard

开源协议:BSD 3-Clause "New" or "Revised" License

下载


AutomaticKeyboard

Swift Version
Build Status
CocoaPods Compatible
Carthage Compatible
Platform
Twitter

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.

  1. source 'https://github.com/CocoaPods/Specs.git'
  2. platform :ios, '9.0'
  3. use_frameworks!
  4. 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:

  1. $ brew update
  2. $ brew install carthage

To integrate AutomaticKeyboard into your Xcode project using Carthage, specify it in your Cartfile:

  1. 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

  1. override open func viewWillAppear(_ animated: Bool) {
  2. super.viewWillAppear(animated)
  3. if let kv = self.keyboardView {
  4. self.keyboard = Keyboard(view: kv, options: self.keyboardOptions)
  5. }
  6. }

and in your viewDidDisappear

  1. override open func viewDidDisappear(_ animated: Bool) {
  2. super.viewDidDisappear(animated)
  3. self.keyboard = nil
  4. }

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 contact@digipolitan.com.

License

AutomaticKeyboard is licensed under the BSD 3-Clause license.