From ff08919206d11d6193fdce4036df83c0a9dab3d2 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 11 Mar 2019 23:25:13 -0400 Subject: [PATCH] Respond to CR. --- SignalMessaging/ViewControllers/OWSViewController.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SignalMessaging/ViewControllers/OWSViewController.m b/SignalMessaging/ViewControllers/OWSViewController.m index daca2d68f..53d87d88f 100644 --- a/SignalMessaging/ViewControllers/OWSViewController.m +++ b/SignalMessaging/ViewControllers/OWSViewController.m @@ -204,9 +204,6 @@ UIInterfaceOrientationMask DefaultUIInterfaceOrientationMask(void) // bar. CGFloat offset = -MAX(0, (self.view.height - self.bottomLayoutGuide.length - keyboardEndFrameConverted.origin.y)); - // UIKit by default animates all changes in response to keyboard events. - // We want to suppress those animations if the view isn't visible, - // otherwise presentation animations don't work properly. dispatch_block_t updateLayout = ^{ if (self.shouldBottomViewReserveSpaceForKeyboard && offset >= 0) { // To avoid unnecessary animations / layout jitter, @@ -223,6 +220,9 @@ UIInterfaceOrientationMask DefaultUIInterfaceOrientationMask(void) if (self.shouldAnimateBottomLayout && CurrentAppContext().isAppForegroundAndActive) { updateLayout(); } else { + // UIKit by default animates all changes in response to keyboard events. + // We want to suppress those animations if the view isn't visible, + // otherwise presentation animations don't work properly. [UIView performWithoutAnimation:updateLayout]; } }