Added check for horizontal animation

When the keyboard is shown in viewWillAppear, the keyboard slides in with the view controller. We can detect this with a check of the change in the y origin.