Merge branch 'mkirk/fix-bottom-artifact-after-selecting-compose'

pull/1/head
Michael Kirk 7 years ago
commit 41deb92adf

@ -21,7 +21,7 @@ public class OWSNavigationBar: UINavigationBar {
@objc
public var callBannerHeight: CGFloat {
return OWSWindowManagerCallScreenHeight()
return OWSWindowManagerCallBannerHeight()
}
@objc
@ -62,7 +62,9 @@ public class OWSNavigationBar: UINavigationBar {
// so we have to set a zindex to avoid obscuring navbar title/buttons.
blurEffectView.layer.zPosition = -1
blurEffectView.autoPinEdgesToSuperviewEdges(with: UIEdgeInsets(top: -100, left: 0, bottom: 0, right: 0))
// navbar frame doesn't account for statusBar, so, same as the built-in navbar background, we need to exceed
// the navbar bounds to have the blur extend up and behind the status bar.
blurEffectView.autoPinEdgesToSuperviewEdges(with: UIEdgeInsets(top: -statusBarHeight, left: 0, bottom: 0, right: 0))
}
NotificationCenter.default.addObserver(self, selector: #selector(callDidChange), name: .OWSWindowManagerCallDidChange, object: nil)

@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark -
extern NSString *const OWSWindowManagerCallDidChangeNotification;
const CGFloat OWSWindowManagerCallScreenHeight(void);
const CGFloat OWSWindowManagerCallBannerHeight(void);
extern const UIWindowLevel UIWindowLevel_Background;

@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
NSString *const OWSWindowManagerCallDidChangeNotification = @"OWSWindowManagerCallDidChangeNotification";
const CGFloat OWSWindowManagerCallScreenHeight(void)
const CGFloat OWSWindowManagerCallBannerHeight(void)
{
if ([UIDevice currentDevice].isIPhoneX) {
// On an iPhoneX, the system return-to-call banner has been replaced by a much subtler green
@ -175,7 +175,7 @@ const UIWindowLevel UIWindowLevel_MessageActions(void)
- (void)didChangeStatusBarFrame:(NSNotification *)notification
{
CGRect newFrame = self.returnToCallWindow.frame;
newFrame.size.height = OWSWindowManagerCallScreenHeight();
newFrame.size.height = OWSWindowManagerCallBannerHeight();
DDLogDebug(@"%@ StatusBar changed frames - updating returnToCallWindowFrame: %@",
self.logTag,
@ -195,7 +195,7 @@ const UIWindowLevel UIWindowLevel_MessageActions(void)
// "Return to call" should remain at the top of the screen.
CGRect windowFrame = UIScreen.mainScreen.bounds;
windowFrame.size.height = OWSWindowManagerCallScreenHeight();
windowFrame.size.height = OWSWindowManagerCallBannerHeight();
UIWindow *window = [[UIWindow alloc] initWithFrame:windowFrame];
window.hidden = YES;
window.windowLevel = UIWindowLevel_ReturnToCall();

Loading…
Cancel
Save