I want to reuse header
section all view controller scene
.header section mean green view and label (\"AMAR LIFE\")
Here is my may 1st
you need to add the following method in every view controller
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(true)
self.navigationController?.isNavigationBarHidden = false
self.navigationController?.navigationBar.setBackgroundImage(#imageLiteral(resourceName: "123"), for: .default)
self.title = "Hi I am tittle"
}
Also if you want to avoid code duplication and do more good just create one parent UIview and write this method in it and then inherit it in all the other views. However both solutions work fine. you can change the title and image according to your needs. Thanks