This repository was archived by the owner on Aug 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRFKeyboard.h
More file actions
43 lines (30 loc) · 1.38 KB
/
RFKeyboard.h
File metadata and controls
43 lines (30 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*!
RFKeyboard
RFUI
Copyright (c) 2012-2014 BB9z
https://github.com/RFUI/Core
The MIT License (MIT)
http://www.opensource.org/licenses/mit-license.php
*/
#import "RFRuntime.h"
@interface RFKeyboard : NSObject
/**
@abstract Converts a keyboardRect via a UIKeyboard notification to the view´s coordinate system.
@param keyboardRect Keyboard frame rect, usually from an UIKeyboard notification´s userinfo[UIKeyboardFrameEndUserInfoKey].
@return The converted keyboard frame rectangle in view ´s coordinate system. Must not be nil.
*/
+ (CGRect)convertKeyboardFrame:(CGRect)keyboardRect toView:(UIView *)view;
/**
@abstract Check whether the keyboard is docked or not.
@param keyboardRect Keyboard frame rect, usually from an UIKeyboard notification´s userinfo[UIKeyboardFrameEndUserInfoKey].
@return `YES` if the keyboard is undocked, `NO` if the keyboard is dock at screen bottom.
*/
+ (BOOL)isUndocked:(CGRect)keyboardRect;
+ (CGFloat)keyboardLayoutHeightForNotification:(NSNotification *)note inView:(UIView *)view;
// experimental
+ (void)setEnableAutoDisimssKeyboardWhenTouch:(BOOL)enabled;
+ (instancetype)defaultManager;
/// Experimental, only called when AutoDisimssKeyboardWhenTouch
@property (copy, nonatomic) void (^keyboardShowCallback)(NSNotification *note);
@property (copy, nonatomic) void (^keyboardHideCallback)(NSNotification *note);
@end