iOS 键盘视图 CLKeyboardOffsetView
- 授权协议: MIT
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/changelee82/CLKeyboardOffsetView
- 软件文档: https://github.com/changelee82/CLKeyboardOffsetView
软件介绍
使用方法:
#import "UIView+CLKeyboardOffsetView.h"
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
// 打开键盘补偿视图
[self.view openKeyboardOffsetView];
self.view.keyboardGap = 10; // 如果需要自定义键盘与第一响应者之间的间隙,则设置此属性,默认为5
}
- (void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];
// 关闭键盘补偿视图
[self.view closeKeyboardOffsetView];
}
如果需要自定义视图向上移动的高度,则使用代理
<CLKeyboardOffsetViewDelegate>
self.view.keyboardOffsetViewDelegate = self;
并添加代理方法
/**
* 弹出键盘时,自定义视图向上移动的高度
*
* @param firstResponder 第一响应者
* @param keyboardHeight 当前弹出键盘的高度
* @param offsetHeight 默认偏移高度
*
* @return 视图向上移动的高度
*/
- (CGFloat)offsetViewHeightWithFirstResponder:(UIView *)firstResponder
keyboardHeight:(CGFloat)keyboardHeight
offsetHeight:(CGFloat)offsetHeight
{
if ([firstResponder isEqual:_testTextField])
{
return keyboardHeight;
}
return offsetHeight;
}
Google API开发详解
江宽,龚小鹏等编 / 电子工业 / 2008-1 / 59.80元
《Google API开发详解:Google Maps与Google Earth双剑合璧》从易到难、由浅入深、循序渐进地介绍了Google Maps API和Google Earth API的开发技术。《Google API开发详解:Google Maps与Google Earth双剑合璧》知识讲解通俗易懂,并有大量的实例供读者更加深刻地巩固所学习的知识,帮助读者更好地进行开发实践。 《Go......一起来看看 《Google API开发详解》 这本书的介绍吧!
XML、JSON 在线转换
在线XML、JSON转换工具
HEX HSV 转换工具
HEX HSV 互换工具
