diff --git a/SignalMessaging/ViewControllers/OWSNavigationController.m b/SignalMessaging/ViewControllers/OWSNavigationController.m index 10cdf6e44..27fb190dd 100644 --- a/SignalMessaging/ViewControllers/OWSNavigationController.m +++ b/SignalMessaging/ViewControllers/OWSNavigationController.m @@ -116,7 +116,9 @@ NS_ASSUME_NONNULL_BEGIN 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); diff --git a/SignalMessaging/categories/UIDevice+featureSupport.swift b/SignalMessaging/categories/UIDevice+featureSupport.swift index 24f60bfda..b38b04763 100644 --- a/SignalMessaging/categories/UIDevice+featureSupport.swift +++ b/SignalMessaging/categories/UIDevice+featureSupport.swift @@ -23,6 +23,7 @@ public extension UIDevice { case 2436: return true default: + // Verify all our IOS_DEVICE_CONSTANT tags make sense when adding a new device size. owsFail("\(logTag) in \(#function) unknown device format") return false } diff --git a/SignalMessaging/utils/OWSWindowManager.m b/SignalMessaging/utils/OWSWindowManager.m index 8beae7885..a42c17892 100644 --- a/SignalMessaging/utils/OWSWindowManager.m +++ b/SignalMessaging/utils/OWSWindowManager.m @@ -19,8 +19,10 @@ const CGFloat OWSWindowManagerCallScreenHeight(void) // On an iPhoneX, the system return-to-call banner has been replaced by a much subtler green // circle behind the system clock. Instead, we mimic the old system call banner as on older devices, // but it has to be taller to fit beneath the notch. + // IOS_DEVICE_CONSTANT, we'll want to revisit this when new device dimensions are introduced. return 64; } else { + return CurrentAppContext().statusBarHeight + 20; } }