- textfield example
- textview example
- change the scroll range at the time of the keyboard display.
- You can perform interactive keyboard display switch.
- You can easily perform the switching of the display to match the height of the keyboard.
Add the following to your Podfile:
pod "Keynode"
use_frameworks!Note: the use_frameworks! is required for pods made in Swift.
Add the following to your Cartfile:
github "KyoheiG3/Keynode"Just add everything in the Keynode.swift file to your project.
- import the Keynode.
import Keynodevar willAnimationHandler: ((show: Bool, rect: CGRect) -> Void)?- Set the method to be called just before the animation.
var animationsHandler: ((show: Bool, rect: CGRect) -> Void)?- Set the method to be called when the display switching animation.
- It is also known at the time of the keyboard operation of the scroll gesture.
var completionHandler: ((show: Bool, responder: UIResponder?, keyboard: UIView?) -> Void)?- Set the method to be called at the end animation.
var gesturePanning: Booltrueis lose the keyboard at scroll gesture.- Default is
true.
var autoScrollInset: Booltrueis automatically set theheightof theUIScrollView contentInset.bottomof keyboard when open.viewof target is the initialization of the argument ofConnector.- Default is
true.
var defaultInsetBottom: CGFloatautoScrollInsetspecify theInset.bottomof the case oftrue.- Default is
0
var gestureOffset: CGFloat- Such as when there is a
toolbar, you can specify the offset of when closing the keyboard with scroll gesture. - If the value is not set, the value specified in the
defaultInsetBottomwill be used.
// global
let UIResponderFirstResponderNotification: String- Notification name for first responder.
// global
let UIResponderFirstResponderUserInfoKey: String- Notification user info key for first responder.
func setResponder(responder: UIResponder)- Can set own responder.
// UIApplication
func needNotificationForFirstResponder(from: AnyObject?)UIResponderFirstResponderNotificationnotification by first responder.
- Obtain the
inputAccessoryViewofsuperviewand has been operating the keyboard, you might not work if the specification has been changed, but it will be addressed in the earliest possible stage. iOS7.0~iOS9.0is confirmed operation.
- Inspired by DAKeyboardControl in danielamitay.
Under the MIT license. See LICENSE file for details.

