Closed bonebox closed 10 years ago
Thanks for raising, I'll look into it, but won't have time till after iOS8 is released Cheers
After looking at it more, this occurs any time the app is backgrounded while the keyboard is active, and then return to the app, not just while on the phone.
It looks like when the app is brought to the foreground, the view gets adjusted back down to its original position even though the keyboard is still active. So when the keyboard is dismissed, IHKeyboardAvoiding adjusts the view back down, but since it has already returned to its original position, it adjusts too far creates the gap. So the fix would be to prevent the view from adjusting down when the app is foregrounded.
Also, the view in question is using auto-layout, which I suspect has something to do with it.
In your AppDelegate's applicationWillEnterForeground you could try calling [IHKeyboardAvoiding removeAll];
Its not a good long term solution for this library - but might fix it
Thanks, that does "fix" it, in the sense that it doesn't create the gap, but of course has the undesired side effect of the control no longer working. I think a better short-term solution is just dismiss the keyboard in applicationDidEnterBackground:
with the following:
[self.window.rootViewController.view endEditing:YES];
Ive pushed out version 1.0.1 with a fix to this, based on your solution
If you activate the keyboard while on a phone call, then disconnect the call and dismiss the keyboard, it pushes the view down further than it should go, leaving a black space at the top.