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>bb10
parent
942c6910d1
commit
8a7fcf0a7d
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue