updated to use line properties

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-09-20 14:07:49 -05:00
parent 5d9944b5ea
commit 62afe434f9

View File

@ -81,9 +81,9 @@ public extension UINavigationController {
/// Returns a ShadowImage based on the line property of NavigationItemModelProtocol
func getNavigationBarShadowImage(for navigationItemModel: NavigationItemModelProtocol) -> UIImage? {
guard let thickness = navigationItemModel.line?.thickness,
let backgroundColor = navigationItemModel.line?.backgroundColor else { return nil }
return backgroundColor.uiColor.image(CGSize(width: thickness, height: thickness))
guard let model = navigationItemModel.line else { return nil }
let line = Line(model: model, nil, nil)
return line.lineColor.image(CGSize(width: line.lineWidth, height: line.lineWidth))
}
/// Convenience function for setting the navigation bar ui