CoreTFManagerVC 强大的键盘躲避管理器,完全解耦版本!
2015-09-19 19:02
465 查看
在iOS 中都会遇到 键盘挡住输入框的情况,这时就可以用到CoreTFManagerVC 键盘管理器了
下载链接:https://github.com/CharlinFeng/CoreTFManagerVC
框架特性:
向下兼容到ios 6.0.
.完全解耦,不需要继承,不需要定义成员属性,类方法直接搞定一切。
.自动管理生命周期,你只需要使用即可,不需要管理控制器的生命周期。本框架效仿百度地图的生命周期管理方案,后面使用会详细说明,此方案最合理。
.支持普通视图,新版本主要是解耦以及增加scrollView的支持。
.支持自定义键盘。自动placeHolder处理。
block封装,不需要任何代理,甚至你连键盘躲避管理器的对象实例都看不到。
.scrollView支持contentInset。
.支持所有设备,包括横竖屏。
.封装了强大的键盘工具条,不需要再担心屏幕小不好切换或者退下键盘了。
.做了比较多的性能优化,最大必的提高性能。
.完善的错误处理机制。
.完善的动画效果及不同键盘切换动画效果,动画曲线效果。
.insetsBottom表示这个文本输入框是否需要向下多留一点空白,一般是文本框下面有提示类文字或者提交类按钮可以设置此值。 .完善的内存管理。
使用很简单的
下载链接:https://github.com/CharlinFeng/CoreTFManagerVC
框架特性:
向下兼容到ios 6.0.
.完全解耦,不需要继承,不需要定义成员属性,类方法直接搞定一切。
.自动管理生命周期,你只需要使用即可,不需要管理控制器的生命周期。本框架效仿百度地图的生命周期管理方案,后面使用会详细说明,此方案最合理。
.支持普通视图,新版本主要是解耦以及增加scrollView的支持。
.支持自定义键盘。自动placeHolder处理。
block封装,不需要任何代理,甚至你连键盘躲避管理器的对象实例都看不到。
.scrollView支持contentInset。
.支持所有设备,包括横竖屏。
.封装了强大的键盘工具条,不需要再担心屏幕小不好切换或者退下键盘了。
.做了比较多的性能优化,最大必的提高性能。
.完善的错误处理机制。
.完善的动画效果及不同键盘切换动画效果,动画曲线效果。
.insetsBottom表示这个文本输入框是否需要向下多留一点空白,一般是文本框下面有提示类文字或者提交类按钮可以设置此值。 .完善的内存管理。
使用很简单的
//安装:请在viewDidAppear中完成 -(void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; [CoreTFManagerVC installManagerForVC:self scrollView:self.scrollView tfModels:^NSArray *{ UIDatePicker *picker=[[UIDatePicker alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 200)]; TFModel *tfm1=[TFModel modelWithTextFiled:_tf1 inputView:nil name:@"tf1" insetBottom:0]; TFModel *tfm2=[TFModel modelWithTextFiled:_tf2 inputView:picker name:@"tf2" insetBottom:0]; TFModel *tfm3=[TFModel modelWithTextFiled:_tf3 inputView:nil name:@"tf3" insetBottom:30]; TFModel *tfm4=[TFModel modelWithTextFiled:_tf4 inputView:nil name:@"tf4" insetBottom:0]; TFModel *tfm5=[TFModel modelWithTextFiled:_tf5 inputView:nil name:@"tf5" insetBottom:0]; TFModel *tfm6=[TFModel modelWithTextFiled:_tf6 inputView:nil name:@"tf6" insetBottom:0]; return @[tfm1,tfm2,tfm3,tfm4,tfm5,tfm6]; }]; } //卸载:请在viewDidDisappear中完成 -(void)viewDidDisappear:(BOOL)animated{ [super viewDidDisappear:animated]; [CoreTFManagerVC uninstallManagerForVC:self]; }
相关文章推荐
- 保存图片到自定义相册文件夹中,实现处理相册被用户误删的情况
- 自信,有风范儿,人生处处有奇迹。
- 对似然函数的理解
- [HDOJ5455]Fang Fang
- 【转载】-java Socket用法详解
- 自定义View(三) switch开关按钮 ViewDragHelper的使用初级
- Android高级控件小练习
- HDU 5461 Largest Point(关键在于最值)——2015 ACM/ICPC Asia Regional Shenyang Online
- 使用ATL创建简单ActiveX控件(二) —— 添加方法/属性和枚举
- redis 集群性能测试以及与单机性能对比
- Oracle压缩总结2— 估计表压缩效应
- 软件工程
- 接口理解2
- 动画Animation 和 xml 解析Animation
- 博客之感想
- HTML5拖放代码
- 二维数组的指针复习
- 从一次 FULL GC 卡顿谈对服务的影响
- Cocos2d-x3.0游戏实例《不要救我》三——背景滚动周期
- C#基础知识系列四(运算符汇总)