how to change status bar color swift code example
Example 1: swift change status bar color
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
setNeedsStatusBarAppearanceUpdate()
}
override var preferredStatusBarStyle: UIStatusBarStyle {
.lightContent
}
Example 2: how to change background color swift
self.view.backgroundColor = .black / .blue / .purple / .clear /ect.