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

// FREEBIE
This commit is contained in:
Matthew Chen 2017-10-16 12:09:28 -04:00
parent 0fe76aaab8
commit f3102e2761
1 changed files with 8 additions and 2 deletions

View File

@ -211,14 +211,20 @@ static void *kConversationInputTextViewObservingContext = &kConversationInputTex
if (self.attachmentToApprove) {
self.contentView.hidden = YES;
self.attachmentApprovalView.hidden = NO;
// Ensure the keyboard is dismissed.
[self.inputTextView resignFirstResponder];
self.contentContraints = @[
[self.attachmentApprovalView autoSetDimension:ALDimensionHeight toSize:300.f],
];
[self setNeedsLayout];
[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;
}