In my case the solution was to subclass UINavigationController and forcing a tab refresh in the methods popViewController, popToRootViewController or popToViewController. It looks like the behaviour occurs in iOS 18 only. None of the dozens of suggestions found worked for me.
The code could looks like this:
class NavigationController: UINavigationController {
override func popToViewController(_ viewController: UIViewController, animated: Bool) -> [UIViewController]? {
if #available(iOS 18.0, *) {
if let myTabBarController = self.parent as? MyTabBarController {
myTabBarController.refreshTabs() // your method for reloading the children
}
}
return super.popToViewController(viewController, animated: animated)
}
}
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: