Giter VIP home page Giter VIP logo

autokeyboard's Introduction

AutoKeyboard for iOS written in Swift

Automatic Keyboard handling with ease. It is fully automatic keyboard handling. Like in android no need to resize views when keyboard appears. It updates constraints which are bounded with bottomLayoutGuide. Feels like bottomLayoutGuide moves UP and DOWN with keyboard. Just need to register and unResgister thats it.

alt tag

Features

  • UITabBarController support added.
  • UIViewController extension, no need to extend classes.
  • Device rotation supported.
  • Multiple UIViewController support.
  • Extremely easy integration.
  • Automatic bottom constraints changes with keyboard
  • Resizing with animation.
  • No need to write extra code.
  • Just registerAutoKeyboard and unRegisterAutoKeyboard .
  • Callback support on keyboard willShow, didShow, willHide, didHide, willChangeFrame, didChangeFrame.
  • Example for keeping scroll position of scrollView

Runtime Requirements

  • iOS8.0 or later
  • Xcode 8.0 - Swift 3.0 or later

Usage

Basic Usage

Alt text

  • Add constrainsts to bottomLayoutGuide and they will update when keyboard appears.
  • And Register your specific ViewController, you should also unregister.
override func viewWillAppear(_ animated: Bool) {
registerAutoKeyboard()
}

override func viewWillDisappear(_ animated: Bool) {
unRegisterAutoKeyboard()
}

Advanced Usage

registerAutoKeyboard { (result) in
print("keyboard status \(result.status)")

switch result.status {
case .willShow:
// ...
case .didShow:
// ...
case .willHide:
// ...
case .didHide:
// ...
}
}

Installing

CocoaPods

To integrate AutoKeyboard into your Xcode project using CocoaPods, specify it in your Podfile and run pod install.

platform :ios, '8.0'
use_frameworks!
pod 'AutoKeyboard'                 // for swift 4
pod 'AutoKeyboard', '~> 1.0.3'     // for swift 3

And import AutoKeyboard

Carthage

Coming soon

Contributing

Contributions are always welcome!

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.