I have an app with up to 10 screens and in the settings screen, I have a toggle to switch between dark/light mode. I want to change the complete app theme on that toggle.
Currently, the app theme change when I change the theme in iOS default settings. But I want the same behavior to happen for my app only.
What I figure out till now is to set a theme variable in the user default and use this code conditional on each view controller
view.overrideUserInterfaceStyle = // .dark // .light
I don't want to use any third party library.