Commit 06da62b5 by Daniel Jonathan Committed by GitHub

Merge pull request #1269 from getkalido/fix/change_private_view

Thank you!
parents b501ecfb 5e0b1bb8
...@@ -128,8 +128,16 @@ open class NavigationBar: UINavigationBar, Themeable { ...@@ -128,8 +128,16 @@ 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 {
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 v.layoutMargins = .zero
} }
}
if let v = topItem { if let v = topItem {
layoutNavigationItem(item: v) layoutNavigationItem(item: v)
......
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