Swiftpack.co - alphatroya/KeyboardManager as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by alphatroya.
alphatroya/KeyboardManager 2.1
Simple wrapper around UIKeyboardNotification events
⭐️ 1
🕓 1 year ago
.package(url: "https://github.com/alphatroya/KeyboardManager.git", from: "2.1")

Keyboard Manager

Swift 5.0+ Run tests codebeat badge Documentation

Simple wrap up for UIKeyboardNotification events

Deprecation notice

During wwdc2021 event apple announce a keyboard layout guide. This new API does the same thing in a more elegant and native way.

If you target your app for iOS 15 and above, you better use this API for setup keyboard avoidance.


The framework introduces a KeyboardObserver object with helper methods that simplify working with UIKeyboardNotification data.

self.observationToken = KeyboardObserver.addObserver { event in
    if case let .willShow(data) = event {
        // process KeyboardManager.Data struct


Swift Package Manager (required Xcode 11)

  1. Select File > Swift Packages > Add Package Dependency. Enter https://github.com/alphatroya/KeyboardManager in the "Choose Package Repository" dialog.
  2. In the next page, specify the version resolving rule as "Up to Next Major" with "1.4.0" as its earliest version.
  3. After Xcode checking out the source and resolving the version, you can choose the "KeyboardManager" library and add it to your app target.


Alexey Korolev, [email protected] Vlad Zaicev, [email protected]


Stars: 1
Last commit: 51 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Add shared last event observer
1 year ago

Merge #52 by @Vladzzzzz

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics