Skip to content

Commit

Permalink
Merge pull request #1269 from getkalido/fix/change_private_view
Browse files Browse the repository at this point in the history
Thank you!
  • Loading branch information
DanielDahan authored Sep 23, 2019
2 parents b501ecf + 5e0b1bb commit 06da62b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Sources/iOS/Navigation/NavigationBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,15 @@ open class NavigationBar: UINavigationBar, Themeable {
//since we do not want to unsafely access private view directly
//iterate subviews to set `layoutMargin` to zero
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 {
Expand Down

0 comments on commit 06da62b

Please sign in to comment.