UIKeyboardFrameChangedByUserInteraction
phím không trả về 1 lần khi chia tách bàn phím.
Dưới đây là giá trị khóa từ điển thông tin người dùng đầy đủ trên UIKeyboardDidShowNotification
/UIKeyboardDidHideNotification
.
2012-07-11 11:52:44.701 Project[3856:707] keyboardDidShow: {
UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {1024, 352}}";
UIKeyboardCenterBeginUserInfoKey = "NSPoint: {512, 944}";
UIKeyboardCenterEndUserInfoKey = "NSPoint: {512, 592}";
UIKeyboardFrameBeginUserInfoKey = "NSRect: {{-352, 0}, {352, 1024}}";
UIKeyboardFrameChangedByUserInteraction = 0;
UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 0}, {352, 1024}}";
}
2012-07-11 11:52:45.675 Project[3856:707] keyboardDidHide: {
UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {1024, 352}}";
UIKeyboardCenterBeginUserInfoKey = "NSPoint: {512, 592}";
UIKeyboardCenterEndUserInfoKey = "NSPoint: {512, 944}";
UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 0}, {352, 1024}}";
UIKeyboardFrameChangedByUserInteraction = 0;
UIKeyboardFrameEndUserInfoKey = "NSRect: {{-352, 0}, {352, 1024}}";
}
Thay vào đó bạn có thể sử dụng UIKeyboardCenterBeginUserInfoKey
hoặc UIKeyboardCenterEndUserInfoKey
chìa khóa để nhận được thông báo khi chia tách bàn phím.
Hy vọng điều này sẽ hữu ích!
Sẽ đánh giá cao một bản cập nhật về cách giải quyết youve này! –
tôi cố gắng trả lời về câu hỏi này trong [ở đây] [1] [1]: http://stackoverflow.com/a/17567217/887325 – Bimawa