From 78b4df95a5d93078650e65ce5dfa9640a77a3488 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 30 Jul 2018 19:25:18 -0600 Subject: [PATCH] fixup call banner offsets --- .../ViewControllers/OWSNavigationController.m | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/SignalMessaging/ViewControllers/OWSNavigationController.m b/SignalMessaging/ViewControllers/OWSNavigationController.m index bd38547ee..4fa9f5853 100644 --- a/SignalMessaging/ViewControllers/OWSNavigationController.m +++ b/SignalMessaging/ViewControllers/OWSNavigationController.m @@ -133,18 +133,11 @@ NS_ASSUME_NONNULL_BEGIN if (@available(iOS 11.0, *)) { if (OWSWindowManager.sharedManager.hasCall) { - if (UIDevice.currentDevice.isIPhoneX) { - // iPhoneX computes status bar height differently. - // IOS_DEVICE_CONSTANT - self.additionalSafeAreaInsets = UIEdgeInsetsMake(navbar.navbarWithoutStatusHeight + 20, 0, 0, 0); - - } else { - self.additionalSafeAreaInsets - = UIEdgeInsetsMake(navbar.navbarWithoutStatusHeight + CurrentAppContext().statusBarHeight, 0, 0, 0); - } + self.additionalSafeAreaInsets = UIEdgeInsetsMake(20, 0, 0, 0); } else { self.additionalSafeAreaInsets = UIEdgeInsetsZero; } + // in iOS11 we have to ensure the navbar frame *in* layoutSubviews. [navbar layoutSubviews]; } else {