Avoid blur as overly-tall navigation bar lingers after dismissal.

Use the precise status bar height.
This commit is contained in:
Michael Kirk 2018-07-17 13:41:03 -06:00
parent 7a5f5476db
commit 11fc674ef4
1 changed files with 3 additions and 1 deletions

View File

@ -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)