Fixed bug where app hangs when iPad is upside down

Fixed #13599