Open PomazanovaAnna opened 1 year ago
You may be able to use .id()
to cause an update:
@ViewBuilder
func makeHomeTab(isActive: Bool) -> some View {
Image(systemName: "house" + (isActive ? ".fill" : ""))
Text("Home".localized(appLanguage)
.id(appLanguage)
}
Unfortunately, it does not update with .id() When the appLanguage property changes, the method makeHomeTab() does not call. Only when the user press on some of the tab bar items.
Hello! I want to add localization on the fly for my project. However, I have @Published property for the current language in custom TabCoordinator, which conforms TabCoordinatable. How can I update tab bar items each time when @Published property is changed? For now, tab bar items will change when the user press on some of them.
Thanks!