iOS: animate screen from current in-flight geometry

If you show/hide the keyboard quickly while we scroll the
screen, the scroll will appear to jump. The reason is that
the screen animation will start from where the model layer
is at, and not the presentation layer. So specify that
the animation should start from the current state of the
presentation layer.

Change-Id: I3db87ab11aab583eb50784b0c0a03a9a07c8b822
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
bb10
Richard Moe Gustavsen 2014-03-18 14:57:41 +01:00 committed by The Qt Project
parent 1f82af17f6
commit cd1f44a9fc
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ void QIOSInputContext::scroll(int y)
newBounds.origin.y = y;
QPointer<QIOSInputContext> self = this;
[UIView animateWithDuration:m_keyboardListener->m_duration delay:0
options:m_keyboardListener->m_curve
options:m_keyboardListener->m_curve | UIViewAnimationOptionBeginFromCurrentState
animations:^{ view.bounds = newBounds; }
completion:^(BOOL){
if (self)