获取系统键盘的高度
来源:互联网 发布:海上钢琴师 知乎 编辑:程序博客网 时间:2024/05/27 14:13
- (void)viewWillAppear:(BOOL)animated
{
[superviewWillAppear:animated];
[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardWillShow:)name:UIKeyboardWillShowNotificationobject:nil];
[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardWillHide:)name:UIKeyboardWillHideNotificationobject:nil];
}
- (void)viewDidDisappear:(BOOL)animated
{
[superviewWillAppear:animated];
[[NSNotificationCenterdefaultCenter]removeObserver:selfname:UIKeyboardWillShowNotificationobject:nil];
[[NSNotificationCenterdefaultCenter]removeObserver:selfname:UIKeyboardWillHideNotificationobject:nil];
}
#pragma mark - 获取键盘的高度
- (void)keyboardWillShow:(NSNotification *)note
{
//获取键盘的高度
NSDictionary *userInfo = [noteuserInfo];
// NSLog(@"keyboard:%@",userInfo);
NSValue *aValue = [userInfoobjectForKey:UIKeyboardFrameEndUserInfoKey];
CGRect keyboardRect = [aValueCGRectValue];
keyboardHeight = keyboardRect.size.height;
}
- (void)keyboardWillHide:(NSNotification *)note
{
}
- 获取系统键盘的高度
- Android系统获取键盘的高度。
- iOS获取系统键盘的高度
- iOS如何获取系统键盘的高度
- 获取键盘的高度
- 获取键盘的高度
- iOS成长之路-获取系统键盘的高度
- 获取iphone键盘的高度
- 获取键盘高度的实现
- iOS获取键盘的高度
- iOS获取键盘的高度
- iOS获取键盘的高度
- iOS获取键盘的高度
- iOS获取键盘的高度
- 动态获取键盘的高度
- IOS 获取键盘的高度
- 获取键盘的高度变化
- 怎么获取键盘的高度
- 人形机器人 (二)--------moveit和gazebo互联
- 刚开始学ps,做出来了第一个项目,去掉眼镜,取前取后做个小flash
- 互联网思维诞生免费流量王 借流量币开创新纪元
- C#中ip地址的获取 .
- Recover Binary Search Tree
- 获取系统键盘的高度
- WinSocket编程——原始套接字
- 闲置图书,要的拿走
- X_Y_Problem
- app推广方案之app推广方法
- WinSocket模型的探讨——完成端口模型
- C语言文件概述
- 片键的选择对分片的数据情况影响
- MFC "扩展DLL" 制作