I would like to do something like that:
I tried to set a transparent background for the NavigationBar :
override func viewDidLoad() {
super.viewDidLoad()
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.isTranslucent = true
}
However, there is a problem. When I launch the view, the HeaderView is not on the top (behind the navigation bar):
But if I scroll down, the HeaderView is going behind the NavigationBar, like that:
I would like to start like that when I launch the view. I don't understand why it's not the case, because all "top parameters" are equal to 0.
Here are my components :