I have a problem when I try to change interface style (dark or light). If I set dark mode I get the navigation bar remains light when I scroll. If I set light mode the navigation bar becomes black. How can I solve this? I use this code to change userInterfaceStyle:
window?.overrideUserInterfaceStyle = .dark
I found a solution by myself. For everyone that has this problem the solution is:
put this code inside TabBarController