Reputation:
How to add background image on top layout the one who has back button . ive tried adding imageview on it using the drag and drop but image is hiding on the back. Anyone has an idea? Thanks
Upvotes: 1
Views: 91
Reputation: 3219
Add background image on top layout the one who has back button
Its called NavigationBar. You can set background image by this:
self.navigationController.navigationBar.setBackgroundImage(UIImage(named: "navBG.png"), for: .default)
Edit:
how about adding a label on a navigation bar?
self.title = "My Title"
Upvotes: 1
Reputation:
Swift 4
self.navigationController?.navigationBar.setBackgroundImage(UIImage(named: "Background.jpg"), for: .default)
Upvotes: 1