/KeyboardFrameChangeListener

iOS helper that notifies you when on-screen keyboard changes its frame

Primary LanguageSwiftMIT LicenseMIT

KeyboardFrameChangeListener

Platform Swift v4.2 Maintainability Test Coverage Build Status CocoaPods Carthage compatible

Notifies you when on-screen keyboard changes its frame.

⚠️ Deprecation Notice

This project became a part of ScrollViewController.

It's obsolete and will no longer be maintained.

Install

Minimum deployment target: iOS 10.0

CocoaPods

You can integrate KeyboardFrameChangeListener with your project using CocoaPods. Just add this line to your Podfile:

pod 'KeyboardFrameChangeListener', '~> 1.0'

Carthage

You can also use Carthage if you prefer by adding following line to your Cartfile:

github "darrarski/KeyboardFrameChangeListener" ~> 1.0

Use

Check out included DemoApp or ScrollViewController library which uses KeyboardFrameChangeListener under the hood.

TL;DR

let listener: KeyboardFrameChangeListening 
listener = KeyboardFrameChangeListener(notificationCenter: NotificationCenter.default)
listener.keyboardFrameWillChange = { change in
    print("Keybaord frame will change: \(change)")
}

Develop

Requirements:

To bootstrap the project run:

bundle install
bundle exec fastlane setup

Then open KeyboardFrameChangeListener.xcodeproj in Xcode.

Use DemoApp build scheme for building and runing demo app.

Use Tests build scheme for runing tests.

To run tests from command line execute:

bundle exec fastlane test

To generate and open test coverage report in HTML format, run:

bundle exec fastlane coverage

License

MIT License - check out LICENSE file.