/ACKeyboard

A simple library for handling keyboard when show and hide, get keyboard frame size when show.

Primary LanguageSwiftMIT LicenseMIT

ACKeyboard

CI Status Version License Platform

Example

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

Requirements

  • Min swift 4.2
  • XCode 10
  • iOS 12

Installation

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

pod 'ACKeyboard'

How to use

let acKeyboard = ACKeyboard()

 acKeyboard
            .on(event: .willShow) { [weak self] option in
                self?.submitButtonLayoutIfNeeded(by: option.endKeyboardFrame.height.supportSafeArea)
            }
            .on(event: .willHide) { [weak self] option in
                self?.resetLayoutSubmitButton()
            }
            .autoHideKeyboard(onTap: view)
            .start()

Demo

Author

Agus Cahyono, cahyo.mamen@gmail.com

License

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