Commit 5e0b1bb8 by phlippieb

Fix Crash in Xcode 11

parent 0858e5f0
...@@ -128,7 +128,15 @@ open class NavigationBar: UINavigationBar, Themeable { ...@@ -128,7 +128,15 @@ open class NavigationBar: UINavigationBar, Themeable {
//since we do not want to unsafely access private view directly //since we do not want to unsafely access private view directly
//iterate subviews to set `layoutMargin` to zero //iterate subviews to set `layoutMargin` to zero
for v in subviews { for v in subviews {
v.layoutMargins = .zero if #available(iOS 13.0, *) {
let margins = v.layoutMargins
var frame = v.frame
frame.origin.x = -margins.left
frame.size.width += (margins.left + margins.right)
v.frame = frame
} else {
v.layoutMargins = .zero
}
} }
if let v = topItem { if let v = topItem {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment