Skip to content

键盘弹出遮挡输入框解决方案,实现方法比较独特,效果也很棒.包括页面push或者present都是使用系统原本的键盘动画,和键盘弹出动画保持一致.https://www.jianshu.com/p/31287e026f18

License

Notifications You must be signed in to change notification settings

lijian096870/LJKeyBroadEventManager

Repository files navigation

LJKeyBroadEventManager

IOS开发键盘上移的一个工具,实现方法独特,比较可靠.保持了键盘弹出的系统动画,使用控制器注册的方式使用而并非全局单例控制.简书地址:https://www.jianshu.com/p/31287e026f18

Example

主要的LJKeyboardManagerDelegate协议方法如下:

@protocol LJKeyboardManagerDelegate <NSObject>

@required
-(void)keyBroadOffset:(CGFloat)offset;

@optional

- (void)keyBroadOffset:(CGFloat)offset Responder:(UIView *)Responder;

- (void)keyBroadScrollOffset:(CGFloat)offset Responder:(UIView *)Responder;

-(CGFloat)TopSpacingToFirstResponder:(UIView*)Responder;

-(BOOL)ShowExtensionToolBar:(UIView*)Responder;

@end

image

Requirements

可用于IOS8.0 Objective-c以及Swift项目

Installation

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

pod 'LJKeyBroadEventManager'

注册:

registerKeyBroadResponder(self);

取消注册

removeKeyBroadResponder(self);

Author

lijian, [email protected]

License

LJKeyBroadEventManager is available under the MIT license. See the LICENSE file for more info.

About

键盘弹出遮挡输入框解决方案,实现方法比较独特,效果也很棒.包括页面push或者present都是使用系统原本的键盘动画,和键盘弹出动画保持一致.https://www.jianshu.com/p/31287e026f18

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published