summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosinputcontext.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-07-29 18:54:31 +0200
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-09-02 16:13:18 +0200
commit8a7fcf0a7df833de56de4d7848c0f5f44ba1ee4f (patch)
treecc17d6ba1d9dca90650dddeb44e345e8e249708b /src/plugins/platforms/ios/qiosinputcontext.mm
parent942c6910d1bab87aebb258d4076386c00ce041ba (diff)
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 <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosinputcontext.mm')
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm4
1 files 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<QIOSInputContext> 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)