|
|
@ -94,11 +94,18 @@ public class OWSNavigationBar: UINavigationBar {
|
|
|
|
|
|
|
|
|
|
|
|
if #available(iOS 11, *) {
|
|
|
|
if #available(iOS 11, *) {
|
|
|
|
return super.sizeThatFits(size)
|
|
|
|
return super.sizeThatFits(size)
|
|
|
|
} else {
|
|
|
|
} else if #available(iOS 10, *) {
|
|
|
|
// pre iOS11, sizeThatFits is repeatedly called to determine how much space to reserve for that navbar.
|
|
|
|
// iOS10
|
|
|
|
|
|
|
|
// sizeThatFits is repeatedly called to determine how much space to reserve for that navbar.
|
|
|
|
// That is, increasing this causes the child view controller to be pushed down.
|
|
|
|
// That is, increasing this causes the child view controller to be pushed down.
|
|
|
|
// (as of iOS11, this is not used and instead we use additionalSafeAreaInsets)
|
|
|
|
// (as of iOS11, this is not used and instead we use additionalSafeAreaInsets)
|
|
|
|
return CGSize(width: fullWidth, height: navbarWithoutStatusHeight + statusBarHeight)
|
|
|
|
return CGSize(width: fullWidth, height: navbarWithoutStatusHeight + statusBarHeight)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// iOS9
|
|
|
|
|
|
|
|
// sizeThatFits is repeatedly called to determine how much space to reserve for that navbar.
|
|
|
|
|
|
|
|
// That is, increasing this causes the child view controller to be pushed down.
|
|
|
|
|
|
|
|
// (as of iOS11, this is not used and instead we use additionalSafeAreaInsets)
|
|
|
|
|
|
|
|
return CGSize(width: fullWidth, height: navbarWithoutStatusHeight + callBannerHeight + 20)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -108,15 +115,16 @@ public class OWSNavigationBar: UINavigationBar {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
guard #available(iOS 11, *) else {
|
|
|
|
|
|
|
|
super.layoutSubviews()
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
self.frame = CGRect(x: 0, y: callBannerHeight, width: fullWidth, height: navbarWithoutStatusHeight)
|
|
|
|
self.frame = CGRect(x: 0, y: callBannerHeight, width: fullWidth, height: navbarWithoutStatusHeight)
|
|
|
|
self.bounds = CGRect(x: 0, y: 0, width: fullWidth, height: navbarWithoutStatusHeight)
|
|
|
|
self.bounds = CGRect(x: 0, y: 0, width: fullWidth, height: navbarWithoutStatusHeight)
|
|
|
|
|
|
|
|
|
|
|
|
super.layoutSubviews()
|
|
|
|
super.layoutSubviews()
|
|
|
|
|
|
|
|
|
|
|
|
guard #available(iOS 11, *) else {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// This is only necessary on iOS11, which has some private views within that lay outside of the navbar.
|
|
|
|
// This is only necessary on iOS11, which has some private views within that lay outside of the navbar.
|
|
|
|
// They aren't actually visible behind the call status bar, but they looks strange during present/dismiss
|
|
|
|
// They aren't actually visible behind the call status bar, but they looks strange during present/dismiss
|
|
|
|
// animations for modal VC's
|
|
|
|
// animations for modal VC's
|
|
|
|