Changing orientation with keyboard open on iOS causes display issues

I’m working on an iOS app that has an area for the user to compose a message. I’ve found that if the keyboard is opened in landscape orientation when rotated to portrait with the keyboard still up there is a bunch of extra whitespace added to the bottom of the screen that pushes the input out of view. I’ve included an small album (the last image shows the correct view).

Album here

I believe my issue is the same as the the one shown here.