As shown in the image the colour of the upper part is orange/yellow and when the side bar is opened or I attempt open it the colour is changed to green. How to make sure its the green colour all the time in all the view controllers.
I tried mimicking the status bar, by this but this also showed only when opening the side menu.
override func viewDidLoad() {
super.viewDidLoad()
// Mimic the status bar
if let statusBarFrame = UIApplication.shared.connectedScenes
.compactMap({ $0 as? UIWindowScene })
.flatMap({ $0.windows })
.first?
.windowScene?
.statusBarManager?
.statusBarFrame {
let statusBarView = UIView(frame: statusBarFrame)
statusBarView.backgroundColor = UIColor.green // Set your desired color
view.addSubview(statusBarView)
}




