使用(void)keyboardWillShow:(NSNotification *)aNotification
获取搜狗输入法的信息时,得到的信息如下,键盘的高度为0.
{
UIKeyboardAnimationCurveUserInfoKey = 7;
UIKeyboardAnimationDurationUserInfoKey = "0.25";
UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {320, 0}}";
UIKeyboardCenterBeginUserInfoKey = "NSPoint: {160, 568}";
UIKeyboardCenterEndUserInfoKey = "NSPoint: {160, 568}";
UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 568}, {320, 0}}";
UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 568}, {320, 0}}";
}
在键盘消失的方法(void)keyboardWillHide:(NSNotification *)aNotification
却能获取键盘的高度。
求问大神,这个问题怎么解决?
沒問題的吧,他會多次呼叫這個通知。後面會得到正確的高度
試試didShow呢。畢竟還沒有展現。
我也遇到這個狀況了,你解決了嗎?