All Projects → cokaholic → Tkkeyboardcontrol

cokaholic / Tkkeyboardcontrol

Licence: mit
TKKeyboardControl adds keyboard awareness and scrolling dismissal (like iMessages app) to any view with only 1 line of code for Swift.

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Tkkeyboardcontrol

TTInputVisibilityController
Lightweight controller to keep your inputs visible when the keyboard is presented.
Stars: ✭ 21 (-80.91%)
Mutual labels:  keyboard, textview, textfield
FormToolbar
Simple, movable and powerful toolbar for UITextField and UITextView.
Stars: ✭ 85 (-22.73%)
Mutual labels:  keyboard, textview, textfield
Nextgrowingtextview
📝 The next in the generations of 'growing textviews' optimized for iOS 8 and above.
Stars: ✭ 1,540 (+1300%)
Mutual labels:  cocoapods, textview
Agemojikeyboard
Emoji Keyboard for iOS
Stars: ✭ 686 (+523.64%)
Mutual labels:  keyboard, cocoapods
Facebook Messenger
Definitely the best way to make Bots on Facebook Messenger with Ruby
Stars: ✭ 927 (+742.73%)
Mutual labels:  messenger, facebook
Pincodeinputview
A input text view for entering pin code.
Stars: ✭ 108 (-1.82%)
Mutual labels:  cocoapods, textview
Listplaceholder
ListPlaceholder is a swift library allows you to easily add facebook style animated loading placeholder to your tableviews or collection views.
Stars: ✭ 511 (+364.55%)
Mutual labels:  cocoapods, facebook
Messenger
A Go (golang) package that allows you to interact with Facebook chat/Messenger using an unofficial API.
Stars: ✭ 7 (-93.64%)
Mutual labels:  messenger, facebook
Inputkit
📝InputKit, an Elegant Kit to limits your input text, inspired by BlocksKit, written in both Objective-C & ⚡️Swift.
Stars: ✭ 420 (+281.82%)
Mutual labels:  textview, textfield
Bootbot
Facebook Messenger Bot Framework for Node.js
Stars: ✭ 886 (+705.45%)
Mutual labels:  messenger, facebook
Spotify Bot
Spotify Messenger Bot
Stars: ✭ 12 (-89.09%)
Mutual labels:  messenger, facebook
Chatblocks
Declarative Messenger chatbot framework
Stars: ✭ 48 (-56.36%)
Mutual labels:  messenger, facebook
Chat app
A flutter chat app built with firestore. It is clone of messenger.User can create stories,chat and search in real time.
Stars: ✭ 493 (+348.18%)
Mutual labels:  messenger, facebook
Uitextfield Navigation
🏄‍♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (+296.36%)
Mutual labels:  keyboard, cocoapods
Pymessager
Python API to develop chatbot on Facebook Messenger Platform
Stars: ✭ 580 (+427.27%)
Mutual labels:  messenger, facebook
Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (+282.73%)
Mutual labels:  cocoapods, textfield
Caprine
Elegant Facebook Messenger desktop app
Stars: ✭ 6,170 (+5509.09%)
Mutual labels:  messenger, facebook
Imageviewer.swift
An easy to use Image Viewer that is inspired by Facebook
Stars: ✭ 1,071 (+873.64%)
Mutual labels:  cocoapods, facebook
Terminal On Fb Messenger
Allows user to take full control of the terminal of their computer through Facebook's messaging service.
Stars: ✭ 410 (+272.73%)
Mutual labels:  messenger, facebook
Wdt Emoji Bundle
Slack like emoji picker with apple/ios, twitter/twemoji, google, emojione, facebook, messenger emoji support
Stars: ✭ 411 (+273.64%)
Mutual labels:  messenger, facebook

TKKeyboardControl

TKKeyboardControl adds keyboard awareness and scrolling dismissal (like iMessages app) to any view with only 1 line of code for Swift4 and it supports SafeArea. This library is inspired by DAKeyboardControl.

Platform Cocoapods Version License Swift

keyboard_test

Features

  • [x] Keyboard closing without UIScrollView
  • [x] Support Swift4
  • [x] Support Safe Area

Installation

CocoaPods

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

pod 'TKKeyboardControl', :git => 'https://github.com/cokaholic/TKKeyboardControl.git', :tag => '2.0.0'

Manually

Add the TKKeyboardControl directory to your project.

Usage

Example project included (./Example)

Adding pan-to-dismiss (functionality introduced in iMessages)

Frame based action handler

view.addKeyboardPanning(frameBasedActionHandler: { keyboardFrameInView, firstResponder, opening, closing in
    // Move interface objects accordingly
    // Animation block is handled for you
})
// Make sure to call self.view.removeKeyboardControl before the view is released.
// (It's the balancing call)

Constraint based action handler

view.addKeyboardPanning(constraintBasedActionHandler: { keyboardFrameInView, firstResponder, opening, closing in
    // Move interface objects accordingly
    // Animation block is handled for you
})
// Make sure to call self.view.removeKeyboardControl before the view is released.
// (It's the balancing call)

Adding keyboard awareness (appearance and disappearance only)

Frame based action handler

view.addKeyboardNonpanning(frameBasedActionHandler: { keyboardFrameInView, firstResponder, opening, closing in
    // Move interface objects accordingly
    // Animation block is handled for you
})
// Make sure to call self.view.removeKeyboardControl before the view is released.
// (It's the balancing call)

Constraint based action handler

view.addKeyboardNonpanning(constraintBasedActionHandler: { keyboardFrameInView, firstResponder, opening, closing in
    // Move interface objects accordingly
    // Animation block is handled for you
})
// Make sure to call self.view.removeKeyboardControl before the view is released.
// (It's the balancing call)

Supporting an above-keyboard input view

The keyboardTriggerOffset property allows you to choose at what point the user's finger "engages" the keyboard.

view.keyboardTriggerOffset = 44.0;	// Input view frame height

view.addKeyboardNonpanning(frameBasedActionHandler: { keyboardFrameInView, firstResponder, opening, closing in
    // Move interface objects accordingly
    // Animation block is handled for you
})
// Make sure to call self.view.removeKeyboardControl before the view is released.
// (It's the balancing call)

Dismissing the keyboard (convenience method)

view.hideKeyboard()

Remove the NSNotification observer at the end of a VC's life (convenience method)

view.removeKeyboardControl()

Notes

Automatic Reference Counting (ARC) support

TKKeyboardControl was made with ARC enabled by default.

Requirements

  • Xcode 8.0 or greater
  • iOS9.0 or greater
  • Swift4.0 or greater

Author

Keisuke Tatsumi, [email protected]

License

TKKeyboardControl is available under the MIT license.

MIT License

Copyright (c) 2018 Keisuke Tatsumi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].