An elegant solution for keeping any UIView visible when the keyboard is being shown
What is IHKeyboardAvoiding?
IHKeyboardAvoiding will translate any UIView up when the keyboard is being shown, then return it when the keyboard is hidden.
Register an avoidingView(UIView) with IHKeyboardAvoiding; when the keyboard is shown, if the avoidingView’s frame will be intersected by the keyboard, then it will move up just above the keyboard. When the keyboard is dismissed, the avoidingView is returned to its original position.
What sets IHKeyboardAvoiding apart from other keyboard avoiding solutions is that it doesn’t require placing your content in a UIScrollView. No scroll view is used. And it isn’t restricted to keeping UITextFields visible, with IHKeyboardAvoiding any UIView can avoid the keyboard
If Autolayout is used then the constraints are animated, otherwise a CGAffine translation is done.
Overview
- Pricing: Free
- Resource Link: https://github.com/IdleHandsApps/IHKeyboardAvoiding
- Resource Maker: Idle Hands Apps
- Mobile Platform Destination: iOS Apps
- Mobile Platform Support: Native iOS
- Programming Languages: Swift
- CocoaPods: IHKeyboardAvoiding
Related resources
RippleEffectView
A Neat Rippling View Effect
BigBrother
Automatically sets the network activity indicator for any performed request
FDStackView
Use UIStackView directly in iOS6+