From 8a7fcf0a7df833de56de4d7848c0f5f44ba1ee4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 29 Jul 2014 18:54:31 +0200 Subject: [PATCH] iOS: Don't store UIViewAnimationOptions value as UIViewAnimationCurve We pull out the magic UIViewAnimationCurve of the keyboard animation when the keyboard is about to show, but we need to defer the shifting of the value 16 bits, as that turns it into a UIViewAnimationOptions, which we can't store in a UIViewAnimationCurve member. Change-Id: Id35dae1ec487951df749dfffb6118b572c28b103 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qiosinputcontext.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm index d109d53168..064098157d 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.mm +++ b/src/plugins/platforms/ios/qiosinputcontext.mm @@ -166,7 +166,7 @@ self.enabled = YES; if (!m_duration) { m_duration = [[notification.userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]; - m_curve = UIViewAnimationCurve([[notification.userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue] << 16); + m_curve = UIViewAnimationCurve([[notification.userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue]); } m_context->scrollToCursor(); } @@ -389,7 +389,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 | UIViewAnimationOptionBeginFromCurrentState + options:(m_keyboardListener->m_curve << 16) | UIViewAnimationOptionBeginFromCurrentState animations:^{ view.bounds = newBounds; } completion:^(BOOL){ if (self)