My keyboard gets stuck all the time. Stuck down and stuck up. My fix is to lock the screen then unlock. The keyboard pops back up or down. It seems to happen when the phones memory is low. I would suggest clearing your memory or closing any unused multitasking apps before you play. This buys me alot of time before it buggs out again.
I am running android 3.2 but I think the issue is with low memory on both devices. I would have to do more tests on ios to see if its caused by the same problem.
Cheers! I hope this helped :-)