Fix presentation animation of new "attachment approval" state of input toolbar.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 0fe76aaab8
commit f3102e2761

@ -211,14 +211,20 @@ static void *kConversationInputTextViewObservingContext = &kConversationInputTex
if (self.attachmentToApprove) { if (self.attachmentToApprove) {
self.contentView.hidden = YES; self.contentView.hidden = YES;
self.attachmentApprovalView.hidden = NO; self.attachmentApprovalView.hidden = NO;
// Ensure the keyboard is dismissed.
[self.inputTextView resignFirstResponder];
self.contentContraints = @[ self.contentContraints = @[
[self.attachmentApprovalView autoSetDimension:ALDimensionHeight toSize:300.f], [self.attachmentApprovalView autoSetDimension:ALDimensionHeight toSize:300.f],
]; ];
[self setNeedsLayout];
[self layoutIfNeeded]; [self layoutIfNeeded];
// Ensure the keyboard is dismissed.
//
// NOTE: We need to do this _last_ or the layout changes in the input toolbar
// will be inadvertently animated.
[self.inputTextView resignFirstResponder];
return; return;
} }

Loading…
Cancel
Save