UIKeyboardFrameChangedByUserInteraction
key does not return 1 all the time when keyboard splits.
Below is the full user info dictionary key values on 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}}";
}
Instead you can use UIKeyboardCenterBeginUserInfoKey
or UIKeyboardCenterEndUserInfoKey
keys to get notified when keyboard splits.
Hope this helps!