NgKeyboardTracker alternatives and similar libraries
Based on the "Keyboard" category.
Alternatively, view NgKeyboardTracker alternatives based on common mentions on social networks and blogs.
-
IQKeyboardManager
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. -
TPKeyboardAvoiding
A drop-in universal solution for moving text fields out of the way of the keyboard in iOS -
IHKeyboardAvoiding
IHKeyboardAvoiding is an elegant solution for keeping any UIView visible when the keyboard is being shown - no UIScrollView required! -
YYKeyboardManager
iOS utility class allows you to access keyboard view and track keyboard animation. -
Toolbar
Awesome autolayout Toolbar. Toolbar is a library for iOS. You can easily create chat InputBar. -
AutoKeyboardScrollView
AutoKeyboardScrollView is an UIScrollView subclass which makes showing and dismissing keyboard for UITextFields much easier. So called keyboard avoidance. -
RSKKeyboardAnimationObserver
DISCONTINUED. Showing / dismissing keyboard animation in simple UIViewController category.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of NgKeyboardTracker or a related project?
README
NgKeyboardTracker
Objective-c library for tracking keyboard in iOS apps.
Adding to your project
If you are using CocoaPods, add to your Podfile:
pod 'NgKeyboardTracker'
To manually add to your projects:
- Add files in
NgKeyboardTracker
folder to your project. - Add these frameworks to your project:
UIKit
.
Features
NgKeyboardTracker
encapsulates keyboard tracking for iOS apps.
It provides convenience to query keyboard's properties anywhere in your application.
You can also use NgKeyboardTracker
to implement iMessage's text input behavior on iOS 7 (UIScrollViewKeyboardDismissModeInteractive
+ persistent inputAccessoryView
) using NgPseudoInputAccessoryViewCoordinator
.
Usage
Start and stop keyboard tracking
In your application delegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[NgKeyboardTracker sharedTracker] start]; // start tracking
return YES;
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
[[NgKeyboardTracker sharedTracker] stop]; // stop tracking
}
Responding to keyboard updates
- Implement
NgKeyboardTrackerDelegate
protocol. - Register as delegate by calling
-addDelegate:
method - Make sure to call
-removeDelegate:
to stop receiving keyboard updates
Keyboard tracker's properties:
appearanceState
: current appearance statebeginFrame
: last known begin frameendFrame
: last known framecurrentFrame
: last known current keyboard's frameanimationDuration
: last known animation durationanimationCurve
: last known animation curveanimationOptions
: derived fromanimationCurve
for convenience
P.S. keyboard's frame.size.height
system's keyboard height plus inputAccessoryView
height.
Pseudo input accessory view coordinator
NgPseudoInputAccessoryViewCoordinator
is NgKeyboardTracker
extension that makes it easier to implement iMessage's text input behavior in iOS 7 with UIScrollViewKeyboardDismissModeInteractive
and persistent inputAccessoryView
.
The view controller:
- Override
loadView
to set custom UIView implementation. - Make sure to call the custom view's
becomeFirstResponder
.
The custom view:
- Create
NgPseudoInputAccessoryViewCoordinator
by calling-createPseudoInputAccessoryViewCoordinator
. - Overrides
-canBecomeFirstResponder
, returnsYES
. - Overrides
-inputAccessoryView
, returns coordinator'spseudoInputAccessoryView
. - Set
UIScrollView
's keyboard dismiss mode toUIScrollViewKeyboardDismissModeInteractive
. - Set desired height of input accessory view with
-setPseudoInputAccessoryViewHeight:
. - Layout keyboard's bar accordingly using information from
NgKeyboardTracker
inlayoutSubviews
.
P.S. See demo application for example.