ngochiencse / HPParallaxHeader

Simple parallax header for UIScrollView.
MIT License
55 stars 16 forks source link

[Request] Header background color option #7

Closed sugitatestblue closed 2 years ago

sugitatestblue commented 2 years ago
final class MyContainerViewController: HPScrollViewController {    
    override var preferredStatusBarStyle : UIStatusBarStyle {
        return UIStatusBarStyle.lightContent
    }

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

        if #available(iOS 13.0, *) {
            let appearance = UINavigationBarAppearance()
            appearance.configureWithTransparentBackground()
            appearance.titleTextAttributes = [.foregroundColor: UIColor.white]
            appearance.backgroundColor = UIColor(red: 0.0/255.0, green: 123.0/255.0, blue: 187.0/255.0, alpha: 1.0)

            navigationController?.navigationBar.scrollEdgeAppearance = appearance
            navigationController?.navigationBar.standardAppearance = appearance
        }
    }

it can't mack white header under clock. Or I want the option for it.

sugitatestblue commented 2 years ago

image I want to make it white. not clear color.

sugitatestblue commented 2 years ago

Finally, I used the code of here.

https://freakycoder.com/ios-notes-13-how-to-change-status-bar-color-1431c185e845

ngochiencse commented 2 years ago

OK, then I'll close this issue.