• Home
  • About
  • Our Apps
  • Learn
  • Contact
Login

Register

Login
Seemu Apps Seemu Apps
  • Home
  • About
  • Our Apps
  • Learn
  • Contact

Tutorial – Set UINavigation Bar Title Image

Home ios Tutorial – Set UINavigation Bar Title Image

Tutorial – Set UINavigation Bar Title Image

Mar 23, 2016 | Posted by Andrew | ios, swift, tutorial, xcode |

Making the UINavigation bar have a title image of your choice is easy with two lines of code. I have setup a XCode project with a simple navigation controller as the root view controller of the default view. It looks like:

navigationcontroller

First of all we have added the following evox.png as follows to our assets.xcassets for the background image we will be using in this tutorial.

evox

Screen Shot 2016-02-23 at 8.03.03 pm

Now to change the navigation bar title image simply use the following code:

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        let imgTitle = UIImage(named: "evox")
        navigationItem.titleView = UIImageView(image: imgTitle)
        
    }

Now your navigation bar will have a background image as follows:

Screen Shot 2016-02-23 at 8.04.33 pm

DownloadSourceCode

Tags: barimagenavigationtitleuinavigationuinavigation imageuinavigation titleuinavigationbar
0
Share

About Andrew

Andrew is a 24 year old from Sydney. He loves developing iOS apps and has done so for two years.

You also might be interested in

Swift CoreML Image Recognition Tutorial

Jun 21, 2017

In this tutorial we take a look at the newly[...]

Tutorial – Transparent UI Navigation Bar

Feb 21, 2016

Making the UINavigation bar transparent & see through is easy[...]

Tutorial – Pass data between View Controllers using a Segue

Aug 2, 2015

In the last tutorial we looked at navigating view controllers[...]

Welcome

Hi I am Andrew and welcome to Seemu Apps! Have a look around, we provide tutorials for primarily iOS apps.
Bluehost website hosting discount

Seemu’s Studio Setup

Blue Yeti Microphone
Rode Stand
Spider Shock Mount
Mac Keyboard Cover
Screenflow - recording software

Contact Us

We're currently offline. Send us an email and we'll get back to you, asap.

Send Message

Footer

:)

© 2026 · Your Website. Theme by HB-Themes.

  • Home
  • About
  • Our Apps
  • Learn
  • Contact
Prev Next