From cd1f44a9fcc2b15af0b08451db93652fa6ffca8f Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 18 Mar 2014 14:57:41 +0100 Subject: iOS: animate screen from current in-flight geometry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/ios/qiosinputcontext.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/ios') diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm index 4704d1a751..f5d1b8f220 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.mm +++ b/src/plugins/platforms/ios/qiosinputcontext.mm @@ -329,7 +329,7 @@ void QIOSInputContext::scroll(int y) newBounds.origin.y = y; QPointer 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) -- cgit v1.2.3