ios键盘高度
来源:互联网 发布:如何定制淘宝客app 编辑:程序博客网 时间:2024/05/16 12:42
- (void)viewDidLoad
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
[[NSNotificationCenter defaultCenter]removeObserver:self];
}
-(void)keyboardWillShow:(NSNotification*)notification{
NSDictionary*info=[notification userInfo];
CGSize kbSize=[[info objectForKey:UIKeyboardFrameEndUserInfoKey]CGRectValue].size;
//
NSValue *animationDurationValue = [info objectForKey:UIKeyboardAnimationDurationUserInfoKey];
NSTimeInterval animationDuration;
[animationDurationValue getValue:&animationDuration];
NSLog(@"keyboard changed, keyboard width = %f, height = %f,animationDuration =%f",
kbSize.width,kbSize.height,animationDuration);
}
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
[[NSNotificationCenter defaultCenter]removeObserver:self];
}
-(void)keyboardWillShow:(NSNotification*)notification{
NSDictionary*info=[notification userInfo];
CGSize kbSize=[[info objectForKey:UIKeyboardFrameEndUserInfoKey]CGRectValue].size;
//
NSValue *animationDurationValue = [info objectForKey:UIKeyboardAnimationDurationUserInfoKey];
NSTimeInterval animationDuration;
[animationDurationValue getValue:&animationDuration];
NSLog(@"keyboard changed, keyboard width = %f, height = %f,animationDuration =%f",
kbSize.width,kbSize.height,animationDuration);
}
- ios键盘高度
- ios 键盘高度
- ios 获取键盘高度
- ios自定义键盘高度
- ios监视键盘高度
- iOS获取键盘高度
- IOS获取键盘高度
- iOS键盘自适应高度
- <iOS>获取键盘高度
- iOS获取键盘高度
- iOS键盘高度
- ios键盘高度监听
- iOS 获取键盘高度
- iOS 获取键盘高度
- iOS获取键盘高度
- iOS 获取键盘高度
- iOS获取键盘高度
- ios --- 动态获取键盘高度
- linux物理内存描述
- Flex的线程类
- 如何让每一天更高效更有意义
- VC中SPIN旋转按钮的使用
- perl novel可变剪接识别(2)
- ios键盘高度
- 新浪微博ios
- 静默安装
- Handler.post()解决非主线程更新UI
- pcDuino U-boot
- 101个鲜为人知的超实用网站
- MyEclipse无法自动编译的解决
- IOS_基础类库之NSBundle
- mssql2008字符串转时间