Skip to content

Commit 610043e

Browse files
committed
update class
1 parent b04b676 commit 610043e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

WRNavigationBar/WRNavigationBar.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ extension UINavigationBar
5050
// add a image(nil color) to _UIBarBackground make it clear
5151
setBackgroundImage(UIImage(), for: .default)
5252
backgroundImageView = UIImageView(frame: CGRect(x: 0, y: 0, width: Int(bounds.width), height: 64))
53+
backgroundImageView?.autoresizingMask = .flexibleWidth
5354
// _UIBarBackground is first subView for navigationBar
5455
subviews.first?.insertSubview(backgroundImageView ?? UIImageView(), at: 0)
5556
}
@@ -66,6 +67,7 @@ extension UINavigationBar
6667
// add a image(nil color) to _UIBarBackground make it clear
6768
setBackgroundImage(UIImage(), for: .default)
6869
backgroundView = UIView(frame: CGRect(x: 0, y: 0, width: Int(bounds.width), height: 64))
70+
backgroundView?.autoresizingMask = .flexibleWidth
6971
// _UIBarBackground is first subView for navigationBar
7072
subviews.first?.insertSubview(backgroundView ?? UIView(), at: 0)
7173
}

0 commit comments

Comments
 (0)