Refresh navigation bar, after updating navigation model received from JS call

This commit is contained in:
Sumanth Nadigadda 2022-04-20 18:40:21 +05:30
parent 781f3d6d7c
commit afacedda9b
2 changed files with 4 additions and 1 deletions

View File

@ -74,6 +74,9 @@ extension NavigationController: MVMCoreViewManagerProtocol {
let model = getNavigationModel(from: viewController) {
setNavigationItem(with: model, for: topViewController)
setNavigationBarUI(with: model)
navigationBar.setNeedsLayout()
navigationBar.layoutIfNeeded()
}
manager?.newDataReceived?(in: viewController)
}

View File

@ -71,7 +71,7 @@ public extension UINavigationController {
let tint = model.tintColor.uiColor
navigationBar.tintColor = tint
let appearance = navigationBar.standardAppearance
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.titleTextAttributes = [NSAttributedString.Key.font: font,
NSAttributedString.Key.foregroundColor: tint];